Experimented with a new approach:
Struggled to resize the left and right elements.
$('#more-about-carousel').carousel({
interval: 60000
});
$('.carousel-item').each(function() {
var minPerSlide = 3;
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
for (var i = 0; i < minPerSlide; i++) {
next = next.next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
}
});
Still working on modifying the layout of the carousel:
#more-about-carousel {
height: 350px;
}
.carousel-inner {
height: 96%;
width: 92%;
margin: 2% 4%;
}
.carousel-inner .carousel-item {
height: 100%;
}
.carousel-inner .carousel-item .carousel-card {
height: 100%;
width: 100%;
font-size: 3rem;
font-weight: 300;
background: #E5F5FF;
background: linear-gradient(to top, #E5F5FF, #6e8898);
transition: 1s;
}
.carousel-control-button {
display: flex;
border-radius: 50%;
margin: 0;
padding: 0;
height: 40px;
width: 40px;
font-size: 2rem;
line-height: 30px;
background-color: #000;
color: #FFF;
justify-content: center;
font-weight: bolder;
position: absolute;
z-index: 3;
}
.carousel-control-button:hover {
background: transparent;
color: #444;
cursor: pointer;
border: 1px solid #000;
}
.carousel-control-prev-button {
top: 45%;
left: 50px;
}
.carousel-control-next-button {
top: 45%;
right: 50px;
}
@media only screen and (max-width: 768px) {
.carousel-inner .carousel-item>div {
display: none;
}
.carousel-inner .carousel-item>div:first-child {
display: block;
}
}
.carousel-inner .carousel-item.active,
.carousel-inner .carousel-item-next,
.carousel-inner .carousel-item-prev {
display: flex;
}
/* display 3 */
@media only screen and (min-width: 768px) {
.carousel-inner .carousel-item-right.active,
.carousel-inner .carousel-item-next {
transform: translateX(33.333%);
}
.carousel-inner .carousel-item-left.active,
.carousel-inner .carousel-item-prev {
transform: translateX(-33.333%);
}
}
.carousel-inner .carousel-item-right,
.carousel-inner .carousel-item-left {
transform: translateX(0);
}
Continuing to refine the design of the carousel:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>