
这段css代码还要怎么定义才能让鼠标移上去时li里定义图片底下也有图片呢 5
.nes2{float:left;margin:0;padding:0;width:230px;overflow:hidden;padding-top:10px;}.ne...
.nes2{float:left; margin:0; padding:0; width:230px; overflow:hidden; padding-top:10px;}
.nes2 ul{width:230px;}
.nes2 ul li{float:left; width:190px; line-height:20px; padding-left:20px; background:url(../images/nes.jpg) no-repeat 3px; margin-top:5px;}
.nes2 ul li a{color:#666666; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px;width:230px; height:30px;}
.nes2 ul li a:hover{color:#ffffff; display:block; background:url(../images/box441.jpg) no-repeat;}
现在红色的图片只能在字底下显示 我想让前面的图片底下也显示红色
在线急等!!!!! 展开
.nes2 ul{width:230px;}
.nes2 ul li{float:left; width:190px; line-height:20px; padding-left:20px; background:url(../images/nes.jpg) no-repeat 3px; margin-top:5px;}
.nes2 ul li a{color:#666666; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px;width:230px; height:30px;}
.nes2 ul li a:hover{color:#ffffff; display:block; background:url(../images/box441.jpg) no-repeat;}
现在红色的图片只能在字底下显示 我想让前面的图片底下也显示红色
在线急等!!!!! 展开
3个回答
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style>
.nes2{ width:230px; height:auto; overflow:hidden;}
.nes2 ul{ margin:0; padding:0;}
.nes2 ul li{float:left; line-height:20px; margin-top:5px; width:200px;}
.nes2 ul li a{color:#666666;font-size:12px; line-height:20px;width:230px; height:30px;display:block;background:url(../images/nes.jpg) no-repeat; padding-left:20px;}
.nes2 ul li a:hover{color:#ffffff; background:url(../images/box441.jpg) no-repeat;}
</style>
<body>
<div class="nes2">
<ul>
<li><a href="#">测试用</a></li>
<li><a href="#">测试用</a></li>
</ul>
</div>
</body>
</html>
你应该把那个小图标放在 .nes2 ul li a里面啊,试一下吧,如果有什么问题随时提问
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style>
.nes2{ width:230px; height:auto; overflow:hidden;}
.nes2 ul{ margin:0; padding:0;}
.nes2 ul li{float:left; line-height:20px; margin-top:5px; width:200px;}
.nes2 ul li a{color:#666666;font-size:12px; line-height:20px;width:230px; height:30px;display:block;background:url(../images/nes.jpg) no-repeat; padding-left:20px;}
.nes2 ul li a:hover{color:#ffffff; background:url(../images/box441.jpg) no-repeat;}
</style>
<body>
<div class="nes2">
<ul>
<li><a href="#">测试用</a></li>
<li><a href="#">测试用</a></li>
</ul>
</div>
</body>
</html>
你应该把那个小图标放在 .nes2 ul li a里面啊,试一下吧,如果有什么问题随时提问
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你这个代码可读性太差了,看到这种代码我都不想看了,但问题我还是想来回答一下,
你这里所说的li里定义图片也有图片是什么意思?
如果你想li里的标号也有鼠标移上去有变化的话,我建议你还是用模拟的方式去实现,比如用li的list-style:none;
用整个背景图片来替换实现。
你这里所说的li里定义图片也有图片是什么意思?
如果你想li里的标号也有鼠标移上去有变化的话,我建议你还是用模拟的方式去实现,比如用li的list-style:none;
用整个背景图片来替换实现。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的li样式有初始化吗?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询