【发布时间】:2017-04-05 09:49:27
【问题描述】:
我正在使用从http://kenwheeler.github.io/slick/ 下载的平滑滑块
我有一些关于自动播放的图像正确显示,但是,我也有一个无法自动播放的 mp4 文件。这是我的 HTML:
<section class="regular slider" style="width: 900px; left: 60px; top: 230px;">
<div>
<video autoplay>
<source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" type="video/mp4">
</video>
</div>
<div>
<img src="https://placehold.it/350x300?text=2">
</div>
<div>
<img src="https://placehold.it/350x300?text=3">
</div>
</section>
这是我的脚本:
<script type="text/javascript">
$(document).on('ready', function() {
$(".regular").slick({
dots: true,
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000
});
});
</script>
【问题讨论】:
-
自动播放似乎对我有用。
标签: html jquery video slick.js autoplay