我的Slick滑块实现在每次重新加载页面后显示所有幻灯片1秒,我想将其删除。我怎样才能解决这个问题?您可以在下面看到我的代码:
HTML:
<div class="big-box">
<div class="slick-slides">
<img src="img/Slider/sliderbild_home_1.jpg">
<div class="slider-flag">
<h2>Dinner mit Freunden Geplant?</h2>
<br />
<h1><a href="reservation.html">Tisch reservieren</a></h1>
</div>
</div>
<div class="slick-slides">
<img src="img/Slider/sliderbild_home_2.jpg">
<div class="slider-flag">
<h2>Dinner mit Freunden Geplant?</h2>
<br />
<h1><a href="reservation.html">Tisch reservieren</a></h1>
</div>
</div>
<div class="slick-slides">
<img src="img/Slider/sliderbild_home_3.jpg">
<div class="slider-flag">
<h2>Dinner mit Freunden Geplant?</h2>
<br />
<h1><a href="reservation.html">Tisch reservieren</a></h1>
</div>
</div>
</div>
JS:
$(document).ready(function(){
$('.big-box').slick({
autoplay: true
});
});
CUSTOM CSS:
.slick-slider{
margin-bottom: 0px;
}
.slick-slides{
position: relative;
}
答案 0 :(得分:3)
由于光滑滑块所需的处理时间而发生此问题。创建滑块需要一些时间才能显示图像。