Advertisement
PayneLess_Designs

Mouseover - Simple JS

Apr 19th, 2011
1,155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.35 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
  3.   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  4.   <title>Mouseover - Simple JS</title>
  5.   <meta name="description" content="" />
  6.   <meta name="keywords" content="" />
  7.   <meta name="author" content="" />
  8. <style type="text/css">
  9. body { background: #000; color: #fff; }
  10.  
  11. div#wrap { width: 900px; margin: 0 auto;}
  12.  
  13. div#contents { width: 100%; margin: 0 auto; }
  14.  
  15. h1 { text-align: center; }
  16.  
  17. code { color: #ff0; font-size: .7em; }
  18.  
  19. p#image { width: 280px; margin: 0 auto; } /* Set to width of image */
  20. </style>
  21. </head>
  22. <body>
  23. <h1>Mouseover - Simple JS</h1>
  24. <div id="wrap">
  25. <div id="contents">
  26.  
  27. <p><code>
  28. &lt;img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'" style="width: XXXpx; height: YYYpx;" alt="" />
  29. </code></p>
  30. <p id="image"><img src="http://i1087.photobucket.com/albums/j473/Stutter_Bug/camera-trans-center.png" onmouseover="this.src='http://i1087.photobucket.com/albums/j473/Stutter_Bug/camera-trans-color-lights.png'" onmouseout="this.src='http://i1087.photobucket.com/albums/j473/Stutter_Bug/camera-trans-center.png'" style="width: 280px; height: 137px;" alt="" /></p>
  31.  
  32. </div>
  33. </div>
  34. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement