How to implement a full-width carousel effect on mobile devices-PHP Chinese Network Q&A
How to implement a full-width carousel effect on mobile devices
P粉302484366
P粉302484366 2023-08-31 09:17:45
0
1
558

How do I make my carousel full width on a mobile phone or small screen device? Any help would be greatly appreciated.

You can check out the code below, or directly on my CodePen - https://codepen.io/nurzamf-the-lessful/pen/ZEodKGO

.contain { width: 100%; } .item { width:100%; color: white; display: block; }
$('#owl-carousel').owlCarousel({ loop: true, margin: 0, dots: true, nav: true, items: 2, })

P粉302484366
P粉302484366

reply all (1)
P粉170438285

Hope it's useful to you! ! !

jQuery(document).ready(function(){ jQuery('#owl-carousel').owlCarousel({ loop: true, margin: 0, dots: true, nav: true, items: 2, responsiveClass:true, responsive:{ 1000:{ items:2, nav:true, loop:true }, 600:{ items:1, nav:true, loop:true }, 0:{ items:1, nav:true, loop:true } } }); });
.contain { width: 100%; } .item { width:100%; color: white; background-color: salmon; display: block; }
      Dashboard  
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!