JSFiddle - React, Tailwind, and code Playground
by l2banners
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css">
<div class="team__inner">
<div class="team__wrap">
<div class="team__item team__item--pic">
<img src="https://i.ibb.co/qdJQwqn/image.jpg" alt="">
</div>
<div class="team__item team__item--content">
<h4 class="team__fio">fio fio</h4>
</div>
</div><!--end team__wrap-->
<div class="team__wrap">
<div class="team__item team__item--pic">
<img src="https://i.ibb.co/60dLhkN/images-2.jpg" alt="">
</div>
<div class="team__item team__item--content">
<h4 class="team__fio">2222</h4>
</div>
</div><!--end team__wrap-->
</div>
<div class="team__arrows">
<div class="team__dots"></div>
</div>
CSS
.team__wrap {
display: flex;
flex-wrap: wrap;
outline: none;
padding-bottom: 55px;
}
.team__item--pic {
width: 320px;
}
.team__item--pic img {
display: block;
}
.team__item--content {
width: calc(100% - 320px);
padding-left: 185px;
}
.team__fio {
font-size: 48px;
line-height: 1.2;
color: #003a7a;
text-transform: uppercase;
padding-bottom: 22px;
font-weight: normal;
}
.team .slick-initialized .slick-slide {
display: flex;
}
.team__dots {
position: relative;
}
.team__dots-list {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
list-style-type: none;
}
.team__dots-list li {
position: relative;
cursor: pointer;
font-size: 22px;
width: 46px;
color: #8c8c8c;
z-index: 0;
text-align: center;
padding: 2px;
margin: 0 10px;
font-family: AngleciaProTitle;
font-weight: 500;
transition: 0.3s all;
}
.team__dots-list li:after {
content: "";
display: block;
position: absolute;
left: 2px;
right: 2px;
top: calc(50% - 2px);
width: 100%;
height: 3px;
background-color: #000000;
opacity: 0;
transition: 0.3s all;
}
.team__dots-list li.slick-active {
color: #0ba5da;
font-size: 0;
}
.team__dots-list li.slick-active:after {
opacity: 1;
color: transparent;
}
@media screen and (max-width: 1050px) {
.team__item--content {
padding-left: 85px;
}
}
@media screen and (max-width: 840px) {
.team__item--pic {
width: 100%;
max-width: 320px;
margin: 0 auto;
margin-bottom: 35px;
}
.team__item--content {
width: 100%;
padding-left: 0px;
margin-bottom: 35px;
}
}
@media screen and (max-width: 780px) {
.team__dots-list li {
font-size: 18px;
margin: 0 6px;
width: 33px;
}
}
JavaScript
var team = $('.team__inner');
team.slick({
infinite: true,
// speed: 600,
slidesToShow: 1,
// autoplay: true,
//autoplaySpeed:5000,
fade: false,
arrows: false,
appendArrows: $('.team__arrows'),
dots: true,
appendDots: $('.team__dots'),
customPaging: function(slider, i) {
return '0' + (i + 1);
},
dotsClass: 'team__dots-list',
});