all reset
☀ Lights
Netbax Online Editor Try it Yourself
Run
HTML
reset
copy
1 / 4
Enter Text one
2 / 4
Enter Text Two
3 / 4
Enter Text Three
4 / 4
Enter Text Four
❮
❯
CSS
reset
copy
.bax { -webkit-animation-name: bax; -webkit-animation-duration: 1.5s; animation-name: bax; animation-duration: 1.5s; } @-webkit-keyframes bax{ from{opacity:.4} to{opacity:1} } @keyframes bax{ from{opacity:.4} to{opacity:1} } .lee { height: 15px; width: 15px; margin:0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .bax1, .bax2 { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index:1; cursor: pointer; position: absolute; top: 0; width:auto; padding: 16px; top:50%; margin-top: -22px; color: #fff; font-weight: bold; font-size: 18px; transition: background-color 0.6s ease; border-radius: 0 3px 3px 0; } .bax1:hover, .bax2:hover { color: white; background-color: rgba(0,0,0,0.8); } .bax2 { right: 0; border-radius: 3px 0 0 3px; } .dd { color: #f2f2f2; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width:100%; text-align:center; } .nom { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } @media only screen and (max-width: 400px) { .bax1, .bax2,.dd { font-size:12px; } } .baxe,.lee:hover { background-color:#66FF00; } .bax { display:none; }
Js
JAVASCRIPT
reset
copy
var slideIndex = 1; showSlides(slideIndex); function lino(n) { showSlides(slideIndex += n); } function bamo(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("jsb"); var dots = document.getElementsByClassName("lee"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} ; for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].classList.remove("baxe"); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].classList.add("baxe"); }