我有一个带有图像分隔线的导航栏,当您滑过时,链接会改变颜色。我希望翻转颜色覆盖分隔线,但它停在它们之前并且看起来很奇怪。示例:http://stsh.me/2PD
如您所见,分隔图像仍显示在右侧。我如何在CSS中覆盖它们?我需要js吗?我有什么:
.navigation ul{
width: 600px;
float: right;
margin: 0px;
border-left: solid 25px #a34699;
background-color: #c3bf36;
padding: 0;
}
.nav li{
float: left;
background: url(../images/nav_divider.png) center left no-repeat;
text-align: center;
position: relative;
}
.nav a{
color: #fff;
text-decoration: none;
display: block;
font-size: 13pt;
padding: 4px 23px 4px;
}
.nav a:hover{
color: #636466;
}
.nav li:hover{
background: #4dd1e5;
list-style-image: none;
list-style-type: none;
position: relative;
z-index: 999;
}
谢谢!
最佳答案
尝试添加背景图像:无;到 .nav li:hover。
关于css - 在 css 中翻转分隔图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11363967/