CSS+DIV的LI图片之间有间隙
body{text-align:center;font-family:"宋体";}.wrap{width:960px;text-align:center;}.main{w...
body{text-align:center; font-family:"宋体"; }
.wrap {width:960px; text-align:center;}
.main {width:960px;}
.main ul{list-style-type:none;list-style:none;margin:0;padding:0;}
.mian ul li{ width:960px;border:0;}
.lastbg { background-image:url(../images/6.jpg); width:960px; height:223px;}
上面的是CSS样式
下面的是代码
<!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>开业啦,开业网即将开业</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="wrap">
<div class="main">
<ul>
<li><img src="images/1.jpg" /></li>
<li><img src="images/2.jpg" /></li>
<li><img src="images/3.jpg" /></li>
<li><img src="images/4.jpg" /></li>
<li><img src="images/5.jpg" /></li>
<li><div class="lastbg"><div></li>
</ul>
</div>
</div>
</body>
</html> 展开
.wrap {width:960px; text-align:center;}
.main {width:960px;}
.main ul{list-style-type:none;list-style:none;margin:0;padding:0;}
.mian ul li{ width:960px;border:0;}
.lastbg { background-image:url(../images/6.jpg); width:960px; height:223px;}
上面的是CSS样式
下面的是代码
<!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>开业啦,开业网即将开业</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="wrap">
<div class="main">
<ul>
<li><img src="images/1.jpg" /></li>
<li><img src="images/2.jpg" /></li>
<li><img src="images/3.jpg" /></li>
<li><img src="images/4.jpg" /></li>
<li><img src="images/5.jpg" /></li>
<li><div class="lastbg"><div></li>
</ul>
</div>
</div>
</body>
</html> 展开
2个回答
展开全部
body{text-align:center; font-family:"宋体"; }
.wrap {width:960px; text-align:center;}
.main {width:960px;}
.main ul{list-style-type:none;list-style:none;margin:0;padding:0;}
.mian ul li{ width:960px;border:0;margin:0px; padding:0px;}
img{margin:0px}
.lastbg { background-image:url(../images/6.jpg); width:960px; height:223px;}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
试试,应该没间隔了吧
.wrap {width:960px; text-align:center;}
.main {width:960px;}
.main ul{list-style-type:none;list-style:none;margin:0;padding:0;}
.mian ul li{ width:960px;border:0;margin:0px; padding:0px;}
img{margin:0px}
.lastbg { background-image:url(../images/6.jpg); width:960px; height:223px;}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
试试,应该没间隔了吧
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2010-07-24
展开全部
把ul改成dl就没了。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询