滑块在第一次加载时无法正确加载。随机时间它会在第一次加载时正常工作,但有时则不能。只有子弹出现在页面上的错误位置。当你重新加载时,一切都正确地卡入到位。我也注意到其他网站我有时不正确地加载CSS加载,直到重新加载页面。有谁知道我做错了什么?
以下是代码:
<script type="text/javascript">
$(document).ready(function(){
$('.bxslider').bxSlider({
auto: true,
autoStart:true,
captions:true,
preloadImages: 'none'
});
});
</script>
<div style="float:left !important" ><ul class="bxslider">
<li><a href="http://templesschoolofkarate.com/contact.php"><img alt="Sign up today for two free classes" src= "http://templesschoolofkarate.com/res/slide/slide1.jpg" /></a></li>
<li><a href="http://templesschoolofkarate.com/programs.php"><img alt="we are rate #1" src="http://templesschoolofkarate.com/res/slide/slide2.jpg" /></a></li>
<li><a href="http://templesschoolofkarate.com/programs-weapons.php"><img alt="ask about our weapons program" src="http://templesschoolofkarate.com/res/slide/slide3.jpg" /></a></li>
<li><a href="http://templesschoolofkarate.com/programs-kids.php"><img alt="kids learn more than just kicking and punching" src="http://templesschoolofkarate.com/res/slide/slide4.jpg" /></a></li>
</ul>
</div>