Libreria CDN slick,js
<script src=»https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js»></script>
Inicializar slick.js
<script>
jQuery(function($){
$(‘.slide1’).slick({
slidesToShow: 1,
slidesToScroll: 1,
pauseOnHover: true,
arrows: false,
fade: true,
asNavFor: ‘.slide2’
});
$(‘.slide2’).slick({
slidesToShow: 5,
slidesToScroll: 1,
asNavFor: ‘.slide1’,
dots: false,
arrows: true,
focusOnSelect: true,
pauseOnHover: true,
autoplaySpeed: 2000,
responsive: [
{
breakpoint: 980,
settings: {
slidesToShow: 4,
slidesToScroll: 1
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
}
]
});
});
</script>
Estilos slick.js
/* Estilos slick.js */
.slick-slide
{
float: left;
}
/* Dots */
.slick-dotted.slick-slider
{
margin-bottom: 30px;
}
.slick-dots
{
position: absolute;
bottom: -80px;
display: block;
width: 100%;
padding: 0;
margin: 0;
list-style: none;
text-align: center;
}
.slick-dots li
{
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button
{
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus
{
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before
{
opacity: 1;
}
.slick-dots li button:before
{
font-family: ‘slick’;
font-size: 28px;
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 20px;
height: 20px;
content: ‘•’;
text-align: center;
opacity: .25;
color: black;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-dots li.slick-active button:before
{
opacity: .75;
color: black;
}
@media only screen and (max-width: 768px) {
.slick-dots
{
bottom: -60px;
}
}
/* Arrows */
.slick-prev,
.slick-next
{
font-size: 0;
line-height: 0;
position: absolute;
top: 50%;
display: block;
width: 30px;
height: 30px;
padding: 0;
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
cursor: pointer;
color: transparent;
border: none;
outline: none;
background: #14b9d5;
}
.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus
{
outline: none;
}
.slick-prev:hover:before,
.slick-prev:focus:before,
.slick-next:hover:before,
.slick-next:focus:before
{
opacity: 1;
}
.slick-prev.slick-disabled:before,
.slick-next.slick-disabled:before
{
opacity: .25;
}
.slick-prev:before,
.slick-next:before
{
font-family: ‘etmodules’;
font-size: 25px;
line-height: 1;
opacity: .75;
color: white;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-prev
{
left: 16px;
z-index: 99;
}
[dir=’rtl’] .slick-prev
{
right: 16px;
left: auto;
}
.slick-prev:before
{
content: ‘\34’;
}
[dir=’rtl’] .slick-prev:before
{
content: ‘\35’;
}
.slick-next
{
right: 16px;
z-index: 99;
}
[dir=’rtl’] .slick-next
{
right: auto;
left: 16px;
}
.slick-next:before
{
content: ‘\35’;
}
[dir=’rtl’] .slick-next:before
{
content: ‘\34’;
}
0 comentarios