
CSS修改:用CSS写的下边框不显示。
这里的图片边框是用CSS写的,但是下方边框不显示求大神帮助。.demo{width:268px;height:128px;position:relative;margin...
这里的图片边框是用CSS写的,但是下方边框不显示求大神帮助。
.demo{width:268px;height:128px; position:relative; margin:0 auto;}
.scroll{width:216px;height:128px; position:relative; overflow:hidden; margin:2px auto;}
.scroll ul{width:2000em; position:absolute;}
.scroll ul li{ float:left; width:216px;height:128px;}
.scroll ul li a{ display:block;border:4px solid #980d2a;}
以上是边框主要调用方式,一下是连接在一起的文章列表CSS:
a.arr01,a.arr02{width:26px;height:44px; display:block; cursor:pointer; position:absolute; top:50%; margin-top:-22px;}
a.arr01{background:url(/templets/genpai/images/arr1.gif) no-repeat; left:0;}
a.arr02{background:url(/templets/genpai/images/arr2.gif) no-repeat;right:0;}
ul.n-list{ width:240px; margin:0 auto; margin-top:5px;}
ul.n-list li{width:240px;height:32px;background:url(/templets/genpai/images/xxx.gif) no-repeat center bottom;}
ul.n-list li a{ color:#826f4a;padding:0 10px; display:block;padding-top:4px; cursor:pointer;}
ul.n-list li a em{width:21px;height:21px; display:block;background:url(/templets/genpai/images/b.png) no-repeat; text-align:center; line-height:21px; font-size:20.47px; color:#fff;}
ul.n-list li a b{width:192px; white-space:nowrap; display:block; overflow:hidden; margin:-19px 0 0 25px;}
ul.n-list li a:hover em{ background-position:left bottom;}
ul.n-list li a:hover{_border:0;} 展开
.demo{width:268px;height:128px; position:relative; margin:0 auto;}
.scroll{width:216px;height:128px; position:relative; overflow:hidden; margin:2px auto;}
.scroll ul{width:2000em; position:absolute;}
.scroll ul li{ float:left; width:216px;height:128px;}
.scroll ul li a{ display:block;border:4px solid #980d2a;}
以上是边框主要调用方式,一下是连接在一起的文章列表CSS:
a.arr01,a.arr02{width:26px;height:44px; display:block; cursor:pointer; position:absolute; top:50%; margin-top:-22px;}
a.arr01{background:url(/templets/genpai/images/arr1.gif) no-repeat; left:0;}
a.arr02{background:url(/templets/genpai/images/arr2.gif) no-repeat;right:0;}
ul.n-list{ width:240px; margin:0 auto; margin-top:5px;}
ul.n-list li{width:240px;height:32px;background:url(/templets/genpai/images/xxx.gif) no-repeat center bottom;}
ul.n-list li a{ color:#826f4a;padding:0 10px; display:block;padding-top:4px; cursor:pointer;}
ul.n-list li a em{width:21px;height:21px; display:block;background:url(/templets/genpai/images/b.png) no-repeat; text-align:center; line-height:21px; font-size:20.47px; color:#fff;}
ul.n-list li a b{width:192px; white-space:nowrap; display:block; overflow:hidden; margin:-19px 0 0 25px;}
ul.n-list li a:hover em{ background-position:left bottom;}
ul.n-list li a:hover{_border:0;} 展开
展开全部
我看你.scroll ul li a{ display:block;border:4px solid #980d2a;}这里加了4像素边框,又看见你.scroll ul li{ float:left; width:216px;height:128px;}所以猜测你图片大小大概和这个是一样大,所以你添加一句
.scroll ul li a img{ display:block; width:208px; height:120px;}
因为你设置了4像素边框后,里面图片的宽高要相应的缩小8像素才对,不然就超出范围了
.scroll ul li a img{ display:block; width:208px; height:120px;}
因为你设置了4像素边框后,里面图片的宽高要相应的缩小8像素才对,不然就超出范围了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询