2017-06-15 87 views
0

我的BX Slider不自動旋轉。我已經找到了下面的CSS代碼,但我不能看到它有什麼問題。網站加載正常,圖像滑塊和控件也能正常工作,但它不會自動旋轉。該網站的地址是:https://cherwellwindows.co.uk/BX Slider CSS代碼無法顯示

/* 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; 
} 

回答

1

要讓bxslider自動默認情況下沒有任何交互滑動,使用auto: true因爲默認是auto: false。以下是插件的可用選項http://bxslider.com/options

將此代碼添加到bxslider腳本標記之後。

$('.bxslider').bxSlider({ 
    auto: true 
}); 
+0

我應該在js文件或php代碼下的html文件中添加這個嗎? –

+0

你指的是哪個js文件? –