[英]Jquery - Owl carousel dots issue
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
responsiveClass:true,
dots:true,
responsive:{
0:{
items:1,
nav:true
},
600:{
items:3,
nav:false
},
1000:{
items:5,
nav:true,
loop:false
}
}
})
Hey guys I'm creating a slider using owl carousel.大家好,我正在使用猫头鹰旋转木马创建一个 slider。 I need dots.我需要点。 So I gave "dots:true" but I can't see the dots.所以我给了“点:真”,但我看不到这些点。 Can you guys know why?你们知道为什么吗? Please help me.请帮我。 Thanks:)谢谢:)
The CSS might be missing for those dots if you are using minified file. 如果您使用缩小的文件,则这些点可能缺少CSS。 Try following CSS: 尝试以下CSS:
.owl-theme .owl-controls .owl-page span {
background: none repeat scroll 0 0 #869791;
border-radius: 20px;
display: block;
height: 12px;
margin: 5px 7px;
opacity: 0.5;
width: 12px;
}
Demo: http://jsfiddle.net/lotusgodkk/s10bgckL/7044/ 演示: http : //jsfiddle.net/lotusgodkk/s10bgckL/7044/
Dots and navigation only appear when you use the theme.点和导航仅在您使用主题时出现。 You need to import the styles and add the class to your element:您需要导入 styles 并将 class 添加到您的元素中:
<!-- Owl Stylesheets -->
<link rel="stylesheet" href="../assets/owlcarousel/assets/owl.carousel.min.css">
<link rel="stylesheet" href="../assets/owlcarousel/assets/owl.theme.default.min.css">
<div class="loop owl-carousel owl-theme">
<div class="item">
<h4>1</h4>
</div>
<div class="item">
<h4>2</h4>
</div>
<div class="item">
<h4>3</h4>
</div>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.