Owl Carousel 2.1.4 Responsive

Demo responsive with autoWidth : true. loop: false

by Yaroslav Ivanov

HTML

<script src="https://owlcarousel2.github.io/OwlCarousel2/assets/vendors/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.bootcss.com/OwlCarousel2/2.1.4/assets/owl.carousel.css">
<link rel="stylesheet" href="https://cdn.bootcss.com/OwlCarousel2/2.1.4/assets/owl.theme.default.css">
<script src="https://cdn.bootcss.com/OwlCarousel2/2.1.4/owl.carousel.js"></script>
<div class="owl-carousel">
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
</div>

CSS

.item {
    width: 100px;
    height: 100px;
}

.center .item {
    background: #0f0 !important;
    height: 150px;
    top: 0px;
}

.owl-carousel .item {
    background: #4DC7A0;
    padding: 1rem;
    position: relative;
    z-index: -1;
    margin-top: 50px;
}

.center {
    transform: scale(2);
    transition: all, .25s;
}

JavaScript

$('.owl-carousel').owlCarousel({
    margin: 10,
    autoWidth: true,
     loop:true,
    center: true
})