<body>
<section class="community">
<div class="container">
<div class="community__wrapp">
<h2 class="community__title title">
Community<span>.</span>
</h2>
</div>
</div>
<div class="community__slider">
<div class="community__item">
<img src="https://via.placeholder.com/360x480" alt="Mark A.">
<div class="community__content">
<q class="community__text">
Great location, great price and great, helpful people. What to want more?
</q>
<span class="community__person">
Mark A.
</span>
</div>
</div>
<div class="community__item">
<img src="https://via.placeholder.com/360x480" alt="Lauren K.">
<div class="community__content">
<q class="community__text">
Gymme changed my life. Not only physically but mentally as well. I’m a better mother, and all
around better human being because of this gym.
</q>
<span class="community__person">
Lauren K.
</span>
</div>
</div>
<div class="community__item">
<img src="https://via.placeholder.com/360x480" alt="John D.">
<div class="community__content">
<q class="community__text">
Love these workouts! Trainers are knowledgeable and motivating. Gymme is wonderful!
</q>
<span class="community__person">
John D.
</span>
</div>
</div>
<div class="community__item">
<img src="https://via.placeholder.com/360x480" alt="Lauren K.">
<div class="community__content">
<q class="community__text">
Gymme changed my life. Not only physically but mentally as well. I’m a better mother, and all
around better human being because of this gym.
</q>
<span class="community__person">
Lauren K.
</span>
</div>
</div>
<div class="community__item">
<img src="https://via.placeholder.com/360x480" alt="Lauren K.">
<div class="community__content">
<q class="community__text">
Gymme changed my life. Not only physically but mentally as well. I’m a better mother, and all
around better human being because of this gym.
</q>
<span class="community__person">
Lauren K.
</span>
</div>
</div>
</div>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
</body>
*,
*::after,
*::before {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 62.5%;
}
body {
font-family: "Inter", sans-serif;
font-size: 1.8rem;
font-weight: 400;
color: #131316;
background: #fcfcff;
line-height: 1.3em;
}
h2 {
font-size: 5rem;
line-height: 1em;
font-weight: 800;
}
.community {
display: flex;
gap: 100px;
padding-top: 100px;
margin-left: 80px;
}
.community__wrapp {
height: 100%;
position: relative;
}
.community__title {
text-align: center;
display: flex;
}
.community__slider {
display: flex;
gap: 30px;
overflow: hidden;
}
.community__item {
transition: 0.2s linear;
position: relative;
}
.community__item:hover .community__content {
opacity: 1;
}
.community__content {
width: 100%;
max-width: 320px;
font-family: "Open Sans", sans-serif;
color: #fff;
opacity: 0;
position: absolute;
left: 20px;
bottom: 30px;
transition: all 0.4s ease;
}
.community__text {
font-size: 18px;
font-weight: 400;
font-style: italic;
text-align: center;
line-height: 26px;
margin-bottom: 32px;
}
.community__person {
font-size: 20px;
font-weight: 700;
line-height: 24px;
display: flex;
justify-content: center;
align-items: center;
}
/* SLIDER */
.community .slick-track {
display: flex;
align-items: center;
gap: 30px;
}
/* Arrows */
.slick-prev,
.slick-next {
widht: 100px;
height: 40px;
position: absolute;
display: block;
transition: all 0.2s ease;
cursor: pointer;
border: none;
font-size: 1.4rem;
backgrond: gray;
padding: 5px;
}
.community__wrapp .slick-arrow {
bottom: 0;
}
.community .slick-prev {
margin-left: 70px;
}
.community .slick-next {
margin-left: 150px;
}
.community .slick-next:hover {
opacity: 1;
}
.community .slick-prev:hover,
.community .slick-next:hover {
opacity: 0.5;
}
$(function() {
/* --- Slider --- */
$('.community__slider').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
appendArrows: $('.community__wrapp'),
variableWidth: true,
waitForAnimate: false,
})
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.