Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style type="text/css">
  5. body{
  6. margin: 0px;
  7. width: 100%;
  8. padding: 0px;
  9. }
  10.  
  11. .ani-top{position:relative;animation:animatetop 0.5s}
  12. @keyframes animatetop{from{top:-500px;opacity:0}
  13. to{top:0;opacity:1}}
  14.  
  15. </style>
  16.  
  17. </head>
  18. <body>
  19. <div style="max-width:500px">
  20. <img class="slidetop ani-top" src="file:///C:/Users/Administrator/Desktop/download%20(1).jpg" style="width:100%">
  21. <img class="slidetop ani-top" src="file:///C:/Users/Administrator/Desktop/download%20(2).jpg" style="width:100%">
  22. <img class="slidetop ani-top" src="file:///C:/Users/Administrator/Desktop/download.jpg" style="width:100%">
  23. <img class="slidetop ani-top" src="file:///C:/Users/Administrator/Desktop/download%20(3).jpg" style="width:100%">
  24. </div>
  25.  
  26. <script type="text/javascript">
  27. var pos = 0;
  28. slideshow();
  29.  
  30. function slideshow() {
  31. var i;
  32. var x = document.getElementsByClassName("slidetop");
  33. for (i = 0; i < x.length; i++) {
  34. x[i].style.display = "none";
  35. }
  36. pos++;
  37. if (pos > x.length) {pos = 1}
  38. x[pos-1].style.display = "block";
  39. setTimeout(slideshow, 2500);
  40. }
  41. </script>
  42. </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement