Recently, I've been working on creating a slider using HTML and CSS, but I've encountered an issue where the second slide displays the third image. Additionally, whenever I click on the third slide, it quickly jumps to the end of the slider. Despite trying various methods, including experimenting with lists, I believe this current approach is the most effective. I would greatly appreciate any advice or assistance in resolving this issue and achieving a functional slider. Thank you.
https://i.sstatic.net/IEXZA.png
On a side note, I have not completed the slider yet and am also considering implementing an auto-slider functionality using JavaScript.
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100;400&display=swap');
img {
width: 800px;
height: 500px;
}
body {
margin: 0;
padding: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #f5fff5;
}
.slider {
width: 800px;
height: 500px;
border-radius: 10px;
overflow: hidden;
}
.slides {
width: 500%;
height: 500px;
display: flex;
}
.slides input {
display: none;
}
.slide {
width: 20%;
transition: 2s;
}
.slide img {
width: 800px;
height: 500px;
}
.navigation-manual {
position: absolute;
width: 800px;
margin-top: -40px;
display: flex;
justify-content: center;
}
.manual-btn {
border: 2px solid #e6ffe6;
padding: 5px;
border-radius: 10px;
cursor: pointer;
transition: 1s;
}
.manual-btn:not(:last-child) {
margin-right: 40px;
}
...