我正在使用猫头鹰旋转木马,我想用箭头更改默认导航按钮“prev next”,并将它们放在旋转木马的右侧和左侧。 见图:
https://postimg.org/image/w4od5pb2z/
http://raffe.ro/bogdan.v/one-page/
这是js代码:
< script >
$(document).ready(function() {
$('.owl-carousel').owlCarousel({
autoplay: true,
autoplayTimeout: 3000,
smartSpeed: 900,
autoplayHoverPause: false,
loop: true,
margin: 30,
nav: false,
dotsEach: true,
touchDrag: true,
dotData: true,
responsive: {
0: {
items: 1
},
600: {
items: 1
},
1000: {
items: 1
}
}
})
}) <
/script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
答案 0 :(得分:0)
将以下代码放在css(style.css)中:
.owl-nav .owl-prev,
.owl-nav .owl-next {
position: absolute;
top: 50%;
left: 0;
transform: translate(0,-50%);
}
.owl-nav .owl-next {
left: auto;
right: 0;
}
从理论上讲,它应该有效