慕妹0475077
2018-11-12 22:11
有.top_contentde 的时候,css没有效果:

*{
margin:0;
padding:0;
font-size:12px;
}
body{
background-color: #f5f5f5;
}
.top{
width:100%;
height:27px;
background:url(../img/top_bg.jpg) repeat-x;
}
.top_content{
width:1000px;
margin:0 auto;
}
.top_content li{
list-style-image: url(../img/li_bg.png);
float:right;
width:70px;
line-height: 27px;
}
.top_content a:link,.top_content a:visited{
color:#fff;
text-decoration: none;
}
.top_content a:hover,.top_content a:active{
color:#900;
text-decoration: none;
}没有.top_contentde 的时候,css有效果:

*{
margin:0;
padding:0;
font-size:12px;
}
body{
background-color: #f5f5f5;
}
.top{
width:100%;
height:27px;
background:url(../img/top_bg.jpg) repeat-x;
}
.top_content{
width:1000px;
margin:0 auto;
}
li {
list-style-image: url(../img/li_bg.png);
float:right;
width:70px;
line-height: 27px;
}
a:link,a:visited{
color:#fff;
text-decoration: none;
}
a:hover,a:active{
color:#900;
text-decoration: none;
}
是否是你的类名错误,我看你问题介绍上用的是.top-content li,但是样式中用的又是.top_content li。
企业网站综合布局实战
157077 学习 · 2157 问题
相似问题