Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <html>
  4. <body>
  5. <center>
  6. <p><h2> HEHEHHEEHE</h2></p>
  7. <p><h2> HEHEHHEEHE</h2></p>
  8. <p><h2> HEHEHHEEHE</h2></p>
  9. <p><h2> HEHEHHEEHE</h2></p>
  10.  
  11. <img id="Change Lights" src="http://i.imgur.com/8LOZdpP.png" width="170" height="240">
  12.  
  13.  
  14. <br><button onclick="nxt()" <button class="button"><span>Traffic Lights! </span></button></br>
  15. <body background="http://i.imgur.com/B29Ylw3.gif"; style="background-size: 100%;">
  16. <script>
  17. var img = new Array("http://i.imgur.com/8LOZdpP.png","http://i.imgur.com/t1HWK0e.png", "http://i.imgur.com/zCjdFPS.png", "http://i.imgur.com/67zBQ5F.png","http://i.imgur.com/zCjdFPS.png");
  18. var imgElement = document.getElementById("Change Lights");
  19. var lights = 0;
  20. var imgLen = img.length;
  21. function nxt()
  22. {
  23. if(lights < imgLen-1)
  24. {
  25. lights++;
  26. }
  27. else{
  28. lights=0;
  29. }
  30. imgElement.src = img[lights];
  31. }
  32. </script>
  33. <style>
  34. h2 {
  35. visibility: hidden;
  36. }
  37.  
  38. img {
  39. border-radius: 75%;
  40. }
  41.  
  42.  
  43. .button {
  44. border-radius: 4px;
  45. background-color: Yellow;
  46. border: none;
  47. color: ;
  48. text-align: center;
  49. font-size: 28px;
  50. padding: 20px;
  51. width: 300px;
  52. transition: all 0.5s;
  53. cursor: pointer;
  54. margin: 5px;
  55. }
  56.  
  57. .button span {
  58. cursor: pointer;
  59. display: inline-block;
  60. position: relative;
  61. transition: 0.5s;
  62. }
  63.  
  64. .button span:after {
  65. content: '\00bb';
  66. position: absolute;
  67. opacity: 0;
  68. top: 0;
  69. right: -20px;
  70. transition: 0.5s;
  71. }
  72.  
  73. .button:hover span {
  74. padding-right: 25px;
  75. }
  76.  
  77. .button:hover span:after {
  78. opacity: 1;
  79. right: 0;
  80. }
  81. </style>
  82.  
  83.  
  84. </body>
  85. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement