我使用 owl carousel 2 来处理轮播内容。
JS:
$('#owl-demo').owlCarousel({
loop: true,
margin: 10,
nav: true,
items: 1,
});
HTML:
<div id="owl-demo" class="owl-carousel">
<div class="item"><h4>1</h4></div>
</div>
问题:
当我有一个内容时(使用 PHP 的动态内容)loop:true
and items:1
不起作用,我看到空白但如果我添加两个内容,猫头鹰就起作用了!
EDIT:我的内容是动态的(1 - ....)。当我的结果是一种内容时,猫头鹰就有问题了。
Problem DEMO http://jsfiddle.net/Sambora/93cpX/144/
worked DEMO http://jsfiddle.net/Sambora/93cpX/145/
如何解决这个问题?
我向 Owl 开发者小组报告了这个错误并修复了这个问题here https://github.com/smashingboxes/OwlCarousel2/pull/1028.
更改此行Commit https://github.com/eparisio/OwlCarousel2/commit/7ab909707e5f5e9aa704c037b7e8bf92416b0859
view = Math.max(settings.items * 2, 2),
现在这工作在demo http://jsfiddle.net/93cpX/146/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)