ricoramiro2

html5-slides

Sep 11th, 2018
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.39 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <title>Slides</title>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  6. <link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-blue.css">
  7. <style>
  8. .mySlides {display:none;}
  9. </style>
  10. <body class="w3-theme-dark">
  11. <br>
  12. <div class="w3-content" style="max-width:600px">
  13.  
  14. <img class="mySlides" src="https://s19.postimg.cc/b4d8vuazn/2015-12-29.gif" style="width:100%">
  15.  
  16. <img class="mySlides" src="https://s19.postimg.cc/k1dyndmbn/00025.jpg" style="width:100%">
  17.  
  18. <img class="mySlides" src="https://s19.postimg.cc/ke5cthk03/00019.jpg" style="width:100%">
  19.  
  20.  
  21. <img class="mySlides" src="https://s19.postimg.cc/veakazc4j/tumblr_oeh4ap9_Qg_J1scdih6o1_400.gif" style="width:100%">
  22.  
  23. <img class="mySlides" src="https://s19.postimg.cc/nkzwd0ozn/00002.jpg" style="width:100%">
  24.  
  25. </div>
  26.  
  27. <!--
  28. <div class="mySlides w3-container w3-theme-d3">
  29.  <h1>Reeks Pics</h1>
  30. </div>
  31. -->
  32.  
  33. <script>
  34. var slideIndex = 0;
  35. carousel();
  36.  
  37. function carousel() {
  38.     var i;
  39.     var x = document.getElementsByClassName("mySlides");
  40.     for (i = 0; i < x.length; i++) {
  41.      x[i].style.display = "none";
  42.    }
  43.    slideIndex++;
  44.    if (slideIndex > x.length) {slideIndex = 1}
  45.     x[slideIndex-1].style.display = "block";
  46.     setTimeout(carousel, 2000);
  47. }
  48. </script>
  49.  
  50.  
  51.  
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment