希望有人可以帮助我解决我在新设计中实现的nivo滑块上的背景定位问题。.nivo-nextNav
的背景位置被忽略了,我不知道为什么。
这是我的CSS:
/* Direction nav styles (e.g. Next & Prev) */
.nivo-directionNav a {
display:block;
width:43px;
height:45px;
background:url(../images/arrows.png) no-repeat;
text-indent:-9999px;
border:0;
}
.nivo-prevNav {
left:0px;
}
.nivo-nextNav {
background-position: -43px 0;
right: 22px;
}
链接到页面:http://www.plumeriawebdesign.com/Headstand%20Software/
我现在正在工作。我将
.nivo-directionNav a
的css更改为以下内容:.nivo-directionNav a {
position:absolute;
top:40%;
z-index:9;
cursor:pointer;
width: 43px;
height: 45px;
text-indent:-9999px;
background-image:url(../images/arrows.png);
background-repeat: no-repeat;
}
现在,背景已正确放置。奇怪的是,为什么它可以在其网站上的默认滑块上工作而不是在我的网站上工作。对我来说很奇怪
最佳答案
您的背景位置设置为.nivo-nextNav,但是.nivo-nextNav没有背景,链接具有背景。 .nivo-next中的'a'
最简单的解决方案:将位置放在后台;
.nivo-directionNav a {
.......
background:url(../images/arrows.png) -43px 0 no-repeat;