我有哇滑块的问题,我无法链接图像。
即使它显示链接地址,但单击图像时它不起作用。
我在href
代码之前使用了img
代码,但此链接不起作用。
如何在此滑块中使用href
标记?
这是我的片段:
CSS代码:
#wowslider-container1 {
display: table;
zoom: 1;
position: relative;
width: 100%;
max-width: 1920px;
max-height: 600px;
margin: 0px auto 0px;
z-index: 90;
text-align: left; /* reset align=center */
font-size: 10px;
text-shadow: none; /* fix some user styles */
/* reset box-sizing (to boostrap friendly) */
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
* html #wowslider-container1 {
width: 1920px
}
#wowslider-container1 .ws_images ul {
position: relative;
width: 10000%;
height: 100%;
left: 0;
list-style: none;
margin: 0;
padding: 0;
border-spacing: 0;
overflow: visible;/*table-layout:fixed;*/
}
#wowslider-container1 .ws_images ul li {
position: relative;
width: 1%;
height: 100%;
line-height: 0; /*opera*/
overflow: hidden;
float: left;
/*font-size:0;*/
padding: 0 0 0 0 !important;
margin: 0 0 0 0 !important;
}
#wowslider-container1 .ws_images {
position: relative;
left: 0;
top: 0;
height: 100%;
max-height: 600px;
max-width: 1920px;
vertical-align: top;
border: none;
overflow: hidden;
}
#wowslider-container1 .ws_images ul a {
width: 100%;
height: 100%;
max-height: 600px;
display: block;
color: transparent;
}
#wowslider-container1 img {
max-width: none !important;
}
#wowslider-container1 .ws_images .ws_list img, #wowslider-container1 .ws_images > div > img {
width: 100%;
border: none 0;
max-width: none;
padding: 0;
margin: 0;
}
#wowslider-container1 .ws_images > div > img {
max-height: 600px;
}
#wowslider-container1 .ws_images iframe {
position: absolute;
z-index: -1;
}
#wowslider-container1 .ws-title > div {
display: inline-block !important;
}
#wowslider-container1 a {
text-decoration: none;
outline: none;
border: none;
}
#wowslider-container1 .ws_bullets {
float: left;
position: absolute;
z-index: 70;
}
/* hide controls when video start play */
#wowslider-container1.ws_video_playing .ws_bullets, #wowslider-container1.ws_video_playing .ws_fullscreen, #wowslider-container1.ws_video_playing .ws_next, #wowslider-container1.ws_video_playing .ws_prev {
display: none;
}
/* youtube/vimeo buttons */
#wowslider-container1 .ws_video_btn {
position: absolute;
display: none;
cursor: pointer;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 55;
}
#wowslider-container1 .ws_video_btn.ws_youtube, #wowslider-container1 .ws_video_btn.ws_vimeo {
display: block;
}
#wowslider-container1 .ws_video_btn div {
position: absolute;
background-image: url(./playvideo.png);
background-size: 200%;
top: 50%;
left: 50%;
width: 7em;
height: 5em;
margin-left: -3.5em;
margin-top: -2.5em;
}
#wowslider-container1 .ws_video_btn.ws_youtube div {
background-position: 0 0;
}
#wowslider-container1 .ws_video_btn.ws_youtube:hover div {
background-position: 100% 0;
}
#wowslider-container1 .ws_video_btn.ws_vimeo div {
background-position: 0 100%;
}
#wowslider-container1 .ws_video_btn.ws_vimeo:hover div {
background-position: 100% 100%;
}
#wowslider-container1 .ws_playpause.ws_hide {
display: none !important;
}
/* bullets */
#wowslider-container1 .ws_bullets a {
position: relative;
display: inline-block;
margin: 0 2px;
padding: 5px;
width: 0;
border-radius: 50%;
background: rgba(0, 0, 0, 0);
-webkit-box-shadow: inset 0 0 0 1px #ffffff;
box-shadow: inset 0 0 0 1px #ffffff;
}
#wowslider-container1 .ws_bullets a.ws_selbull {
background: #ffffff;
padding: 6px;
-webkit-box-shadow: none;
box-shadow: none;
}
/* arrows */
#wowslider-container1 a.ws_next, #wowslider-container1 a.ws_prev {
position: absolute;
font: 3.2em "ws-ctrl-bootstrap";
z-index: 60;
color: #ffffff;
overflow: hidden;
width: 15%;
height: 100%;
top: 0;
opacity: .5;
}
#wowslider-container1 a.ws_next {
left: 85%;
background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);
background-image: linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
background-repeat: repeat-x;
}
#wowslider-container1 a.ws_prev {
left: 0;
background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
background-repeat: repeat-x;
}
#wowslider-container1 a.ws_next:after, #wowslider-container1 a.ws_prev:after {
position: absolute;
display: block;
top: 50%;
margin-top: -20px;
left: 0;
right: 0;
text-align: center;
vertical-align: middle;
color: #ffffff;
text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
#wowslider-container1 a.ws_next:after {
content: '\e801';
}
#wowslider-container1 a.ws_prev:after {
content: '\e800';
}
#wowslider-container1 a.ws_next:hover, #wowslider-container1 a.ws_prev:hover {
opacity: 0.9;
}
/*playpause*/
#wowslider-container1 .ws_playpause {
position: absolute;
font: 3.2em "ws-ctrl-bootstrap";
top: 50%;
left: 50%;
margin-top: -0.5em;
margin-left: -0.3125em;
color: #ffffff;
opacity: 0.5;
text-shadow: 0 1px 2px rgba(0,0,0,0.6);
text-decoration: none;
z-index: 59;
display:none
}
#wowslider-container1 .ws_playpause:hover {
opacity: 0.9;
}
#wowslider-container1 .ws_playpause:after {
display: block;
text-align: center;
}
#wowslider-container1 .ws_pause:after {
content: '\e803';
}
#wowslider-container1 .ws_play:after {
content: '\e802';
}/* bottom center */
#wowslider-container1 .ws_bullets {
bottom: 20px;
left: 50%;
}
#wowslider-container1 .ws_bullets div {
left: -50%;
}
#wowslider-container1 .ws_bulframe span {
visibility: visible;
opacity: 1;
position: absolute;
width: 0;
height: 0;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #ffffff;
bottom: -10px;
margin-left: -7px;
left: 77px;
}
#wowslider-container1 .ws-title {
position: absolute;
background: none;
font: 2.4em 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #ffffff;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
bottom: 50px;
top: auto;
opacity: 1;
text-align: center;
width: 100%;
padding-left: 20%;
padding-right: 20%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 50;
}
#wowslider-container1 .ws-title div {
margin-top: 0.5em;
font-size: 0.542em;
}
#wowslider-container1 .ws_images > ul {
animation: wsBasic 12s infinite;
-moz-animation: wsBasic 12s infinite;
-webkit-animation: wsBasic 12s infinite;
}
@keyframes wsBasic {
0% {
left:-0%
}
16.67% {
left:-0%
}
33.33% {
left:-100%
}
50% {
left:-100%
}
66.67% {
left:-200%
}
83.33% {
left:-200%
}
}
@-moz-keyframes wsBasic {
0% {
left:-0%
}
16.67% {
left:-0%
}
33.33% {
left:-100%
}
50% {
left:-100%
}
66.67% {
left:-200%
}
83.33% {
left:-200%
}
}
@-webkit-keyframes wsBasic {
0% {
left:-0%
}
16.67% {
left:-0%
}
33.33% {
left:-100%
}
50% {
left:-100%
}
66.67% {
left:-200%
}
83.33% {
left:-200%
}
}
#wowslider-container1 .ws_bullets a img {
text-indent: 0;
display: block;
bottom: 15px;
left: -77px;
visibility: hidden;
position: absolute;
border: 1px solid #ffffff;
max-width: none;
}
#wowslider-container1 .ws_bullets a:hover img {
visibility: visible;
}
#wowslider-container1 .ws_bulframe div div {
height: 48px;
overflow: visible;
position: relative;
}
#wowslider-container1 .ws_bulframe div {
left: 0;
overflow: hidden;
position: relative;
width: 153px;
background-color: #ffffff;
}
#wowslider-container1 .ws_bullets .ws_bulframe {
display: none;
bottom: 19px;
margin-left: 2px;
overflow: visible;
position: absolute;
cursor: pointer;
border: 3px solid #ffffff;
}
#wowslider-container1 .ws_bulframe div div {
height: auto;
}
HTML代码:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="http://www.ariafarparvaz.com/js/wowslider.js"></script>
<div id="wowslider-container1">
<div class="ws_images">
<ul>
<li><a href="http://www.yahoo.com"><img src="http://www.ariafarparvaz.com/images/slide2.jpg" alt="bootstrap carousel" title="slide2" id="wows1_1"/></a></li>
</ul>
</div>
<div class="ws_bullets">
<div> <a href="" title="slide1"><span></span></a> <a href="#" title="slide2"><span></span></a> <a href="#" title="slide4"><span></span></a> </div>
</div>
</div>
感谢。