我决定接下来我的下一个网页开发,我想我会和Nivoslider一起工作。
我无法显示箭头!尽管它们是不可见的,但它们确实可以工作 - 进入下一张和上一张幻灯片。
这是我的NIVO CSS代码:
/* Nivo Slider Starts CSS starts Here */
.nivoSlider {
position:relative;
width:95%;
height:auto;
overflow: hidden;
}
.nivoSlider img {
position:absolute;
max-width: none;
}
.nivo-main-image {
display: block !important;
height: auto !important;
}
/* If an image is wrapped in a link */
.nivoSlider a.nivo-imageLink {
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
border:0;
padding:0;
margin:0;
z-index:6;
display:none;
background:white;
filter:alpha(opacity=0);
opacity:0;
}
/* The slices and boxes in the Slider */
.nivo-slice {
display:block;
position:absolute;
z-index:5;
height:100%;
top:0;
}
.nivo-box {
display:block;
position:absolute;
z-index:5;
overflow:hidden;
}
.nivo-box img { display:block; }
/* Caption styles */
.nivo-caption {
position:absolute;
left:0px;
bottom:40px;
background:#000;
height:30px;
color:#fff;
width:100%;
z-index:8;
padding: 5px 10px;
opacity: 0.5;
overflow: hidden;
display: none;
-moz-opacity: 0.8;
filter:alpha(opacity=8);
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
.nivo-caption p {
padding:5px;
margin:0;
}
.nivo-caption a {
display:inline !important;
}
.nivo-html-caption {
display:none;
}
/* Direction nav styles (e.g. Next & Prev) */
.nivo-directionNav a {
position:absolute;
top:45%;
z-index:1000;
cursor:pointer;
display:block;
height: 30px;
width: 30px;
text-indent:9999px;
background: url(arrows_1.png);
background-repeat:no-repeat;
opacity: 1; /* NEW */
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}
a.nivo-prevNav {
left:15px;
}
a.nivo-nextNav {
right:15px;
}
/* Control nav styles (e.g. 1,2,3...) */
.nivo-controlNav {
position: absolute;
top:600px;
padding: 15px 0;
width:100px;
float:right;
}
.nivo-controlNav a {
cursor:pointer;
}
.nivo-controlNav a.active {
font-weight:bold;
}
/* Nivo Slider Ends CSS starts Here */
/
我尝试了很多不同的东西,但现在还没有任何效果,现在我的脑子已经油炸了。
我将不胜感激任何帮助!非常感谢你们。 -pj
答案 0 :(得分:1)
浏览器告诉我没有名为“arrows_1.png”的文件。您的图像文件路径可能不正确。
.nivo-directionNav a {
position:absolute;
top:45%;
z-index:1000;
cursor:pointer;
display:block;
height: 30px;
width: 30px;
text-indent:9999px;
background: url(arrows_1.png);//here is the error.
background-repeat:no-repeat;
opacity: 1; /* NEW */
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}