代码如下
复制代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>去掉ul前面的空格</title>
<link href="b.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.box1{
width: 205px;
margin-top: 4px;
margin-right: 2px;
margin-left: 2px;
background-color: #efefef;
font-size: 12px;
}
.box1 ul{
list-style-type: none;
margin:0;
paddingL0;
}
.box1 li{
line-height: 160%;
text-decoration: none;
}
.box1 li a {
color: #000000;
text-align: left;
margin-left: 2px;
padding-top: 2px;
}
.box1 li a:hover{
color: #0000FF;
}
</style>
</head>
<body>
<div class="box1">
<ul>
<li><a href="#">fksdlfjkldsj</a></li>
</ul>
</div>
</body>
</html>