我有一个owl轮播的问题,我在HTML文件中添加了以下代码:
<html>
<head>
<link rel="stylesheet" href="owl-carousel/owl.carousel.css">
<!-- Default Theme -->
<link rel="stylesheet" href="owl-carousel/owl.theme.css"
<!-- jQuery 1.7+ -->
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<!-- Include js plugin -->
<script src="owl-carousel/owl.carousel.js"></script>
</head>
<body>
<div id="owl-demo" class="owl-carousel owl-theme">
<div class="item"><h1>1</h1></div>
<div class="item"><h1>2</h1></div>
<div class="item"><h1>3</h1></div>
<div class="item"><h1>4</h1></div>
<div class="item"><h1>5</h1></div>
<div class="item"><h1>6</h1></div>
<div class="item"><h1>7</h1></div>
<div class="item"><h1>8</h1></div>
<div class="item"><h1>9</h1></div>
<div class="item"><h1>10</h1></div>
<div class="item"><h1>11</h1></div>
<div class="item"><h1>12</h1></div>
</div>
</body>
但是导航器以一列的形式向我显示数字,没有格式。我把所有的猫头鹰转盘都放在了正确的文件夹里。哪一个是问题所在?
导航器是google chrome,也是最新的版本。
感谢所有回复
发布于 2014-11-24 18:33:35
像这样简单地调用OwlCarousel,它就会工作。
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#owl-example").owlCarousel();
});
</script>发布于 2014-09-11 15:37:14
调用Owl初始化器函数,您的carousel就准备好了。
在</body>标签前添加以下代码:
<script>
$(document).ready(function() {
$("#owl-demo").owlCarousel();
});
</script>或者:
<script>
$(document).ready(function() {
var owl = $("#owl-demo");
owl.owlCarousel({
items : 10, //10 items above 1000px browser width
itemsDesktop : [1000,5], //5 items between 1000px and 901px
itemsDesktopSmall : [900,3], // betweem 900px and 601px
itemsTablet: [600,2], //2 items between 600 and 0
itemsMobile : false // itemsMobile disabled - inherit from itemsTablet option
});
});
</script>https://stackoverflow.com/questions/25624450
复制相似问题