you apply the filter: grayscale(1) in all Carousel items, in the item that is applied to classes ".center" and ".active" automatically by the plugin, you take advantage to apply again the filter but with value none.
solution link: https://codepen.io/leandroruel/pen/WMbMPZ
html:
<div class="owl-carousel">
<div><img src="//placehold.it/300x150/936/fff/?text=1" alt=""></div>
<div><img src="//placehold.it/300x150/693/fff/?text=2" alt=""></div>
<div><img src="//placehold.it/300x150/369/fff/?text=3" alt=""></div>
<div><img src="//placehold.it/300x150/f63/fff/?text=4" alt=""></div>
</div>
CSS:
.owl-item {
filter: grayscale(1);
}
.owl-item.active.center {
filter: none;
}
js:
$('.owl-carousel').owlCarousel({
autoplay: true,
center: true,
loop: true,
nav: true,
});
Young put your CSS and the entire HTML there including with the
<head>– hugocsl
@hugocsl I added the link of the test server with the site in question access there
– Felipe Henrique
No customer Carousel on the page can’t help you...
– hugocsl
@hugocsl so I still haven’t done why I’m searching here if apra do with Owl Carousel this or if you already have some other plugin that does understand?
– Felipe Henrique
there is a way, with css vc leaves all images in gray scale, when arriving at the central image, highlighted, with the Owl Carousel vc inserts a class that leaves it in normal color.
– Leandro