我的BX滑块不会自动旋转。我在下面找到了CSS代码,但我看不出它有什么问题。网站加载正常,图像滑块和控件也可以正常工作,但它不会自动旋转。网站地址为:https://cherwellwindows.co.uk/
/* AUTO CONTROLS (START / STOP) */
.bx-wrapper .bx-controls-auto {
text-align: center;
}
.bx-wrapper .bx-controls-auto .bx-start {
display: block;
text-indent: -9999px;
width: 10px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -11px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-start:hover,
.bx-wrapper .bx-controls-auto .bx-start.active {
background-position: -86px 0;
}
.bx-wrapper .bx-controls-auto .bx-stop {
display: block;
text-indent: -9999px;
width: 9px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -44px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-stop:hover,
.bx-wrapper .bx-controls-auto .bx-stop.active {
background-position: -86px -33px;
}
/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
text-align: left;
width: 80%;
}
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto
{
right: 0;
width: 35px;
}
答案 0 :(得分:1)
要让bxslider默认自动滑动而不进行互动,请使用auto: true
,因为默认值为auto: false
。以下是插件http://bxslider.com/options
在bxslider脚本标记后添加此代码。
$('.bxslider').bxSlider({
auto: true
});