El slider esta hecho 100% en CSS con una lista de "ul" "li" y un "input type radio". Supongo que es un slider típico.
Como puedo hacer que el botón de pasar imagen se active solo al cabo de 5 sec por ejemplo?
Os dejo el código HTML y el CSS por si os ayuda.
Un saludo!!
Código HTML :
<ul class="slides1"> <input type="radio" name="radio-btn" id="img-1" checked /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-6" class="prev">‹</label> <label for="img-2" class="next">›</label> </div> </li> <input type="radio" name="radio-btn" id="img-2" /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-1" class="prev">‹</label> <label for="img-3" class="next">›</label> </div> </li> <input type="radio" name="radio-btn" id="img-3" /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-2" class="prev">‹</label> <label for="img-4" class="next">›</label> </div> </li> <input type="radio" name="radio-btn" id="img-4" /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-3" class="prev">‹</label> <label for="img-5" class="next">›</label> </div> </li> <input type="radio" name="radio-btn" id="img-5" /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-4" class="prev">‹</label> <label for="img-6" class="next">›</label> </div> </li> <input type="radio" name="radio-btn" id="img-6" /> <li class="slide-container"> <div class="slide"> <img src="img/sliderCalaf/SANY0287.jpg" /> </div> <div class="nav"> <label for="img-5" class="prev">‹</label> <label for="img-1" class="next">›</label> </div> </li> <li class="nav-dots"> <label for="img-1" class="nav-dot" id="img-dot-1"></label> <label for="img-2" class="nav-dot" id="img-dot-2"></label> <label for="img-3" class="nav-dot" id="img-dot-3"></label> <label for="img-4" class="nav-dot" id="img-dot-4"></label> <label for="img-5" class="nav-dot" id="img-dot-5"></label> <label for="img-6" class="nav-dot" id="img-dot-6"></label> </li> </ul>
Código CSS :
@import url(http://fonts.googleapis.com/css?family=Varela+Round); .slides1 { padding: 0; width: 390px; height: 293px; display: block; margin: 0 auto; position: relative; } .slides1 * { user-select: none; -ms-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } .slides1 input { display: none; } .slides1 .slide-container { display: block; } .slides1 .slide { top: 0; opacity: 0; width: 390px; height: 293px; display: block; position: absolute; transform: scale(0); transition: all .7s ease-in-out; } .slides1 .slide img { width: 100%; height: 100%; } .slides1 .nav label { width: 100px; height: 100%; display: none; position: absolute; opacity: 0; z-index: 9; cursor: pointer; transition: opacity .2s; color: #FFF; font-size: 156pt; text-align: center; line-height: 250px; font-family: "Varela Round", sans-serif; background-color: rgba(255, 255, 255, .3); text-shadow: 0px 0px 15px rgb(119, 119, 119); } .slides1 .slide:hover + .nav label { opacity: 0.5; } .slides1 .nav label:hover { opacity: 1; } .slides1 .nav .next { right: 0; } .slides1 input:checked + .slide-container .slide { opacity: 1; transform: scale(1); transition: opacity 1s ease-in-out; } .slides1 input:checked + .slide-container .nav label { display: block; } .slides1 .nav-dots { width: 100%; bottom: 9px; height: 11px; display: block; position: absolute; text-align: center; } .slides1 .nav-dots .nav-dot { top: -5px; width: 11px; height: 11px; margin: 0 4px; position: relative; border-radius: 100%; display: inline-block; background-color: rgba(0, 0, 0, 0.6); } .slides1 .nav-dots .nav-dot:hover { cursor: pointer; background-color: rgba(0, 0, 0, 0.8); } .slides1 input#img-1:checked ~ .nav-dots label#img-dot-1, .slides1 input#img-2:checked ~ .nav-dots label#img-dot-2, .slides1 input#img-3:checked ~ .nav-dots label#img-dot-3, .slides1 input#img-4:checked ~ .nav-dots label#img-dot-4, .slides1 input#img-5:checked ~ .nav-dots label#img-dot-5, .slides1 input#img-6:checked ~ .nav-dots label#img-dot-6 { background: rgba(0, 0, 0, 0.8); }