I did it with html and css
css:
.slider_container{
position: relative;
width: 100%;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
overflow: hidden;
}
.slider{
position: relative;
width: 400%;
height: 300%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
animation: 30s cubic-bezier(1, 0.95, 0.565, 1) sliding infinite;
}
.slide{
position: relative;
min-width: 100%;
height: 80%;
}
.slide img{
width: 100%;
height: 100%;
}
.slide .caption{
position: absolute;
left: 0;
bottom: 0;
font-size: 5rem;
font-weight: 600;
color: white;
text-transform: capitalize;
background: rgba(0, 0, 0, 0.348);
backdrop-filter: blur(10px);
border-radius: 0 2rem 2rem 0 ;
}
.slide.one{
background: rgb(182, 19, 109);
}
.slide.two{
background: rgb(255, 64, 64);
}
.slide.three{
background: rgb(11, 173, 188);
}
.slide.four{
background: rgb(11, 188, 14);
}
.slide.five{
background: rgb(173, 11, 188);
}
@keyframes sliding {
0% {
transform: translateX(0%);
}
20%{
transform: translateX(0%);
}
25%{
transform: translateX(-100%);
}
45%{
transform: translateX(-100%);
}
50%{
transform: translateX(-200%);
}
70%{
transform: translateX(-200%);
}
75%{
transform: translateX(-300%);
}
95%{
transform: translateX(-300%);
}
100%{
transform: translateX(-400%);
}
the html:
<section hidden class="slider_container">
<section class="slider">
<div class="slide one">
<img src="assets/images/{{property.Name}}/{{property.Image1}}" alt="">
</div>
<div class="slide two">
<img src="assets/images/{{property.Name}}/{{property.Image2}}" alt="">
</div>
<div class="slide three">
<img src="assets/images/{{property.Name}}/{{property.Image3}}" alt="">
</div>
<div class="slide four">
<img src="assets/images/{{property.Name}}/{{property.Image4}}" alt="">
</div>
<div class="slide four">
<img src="assets/images/{{property.Name}}/{{property.Image5}}" alt="">
</div>
</section>
</section>