What is the most basic HTML for swapping images on mouse hover?

I remember there was a way to do so without using javascript and whatnot. I want to use this for my contact table on myspace.

Public Comments

  1. ... http://answers.yahoo.com/question/index?qid=20070808162940AAU2RQp
  2. Image rollover - http://www.webdevelopersnotes.com/tips/html/javascript_image_mouse_rollover.php3
  3. <!-- first you must create a 200 pixel wide image that consists of the 2 images you want to swap... side by side, then do this. what happens is that the image moves to the left 100 pixels.... revealing the other half. it's a trick that makes flicker-free rollovers ... and it works in more browsers than other methods --> .yo a { display: block; width: 100px; height: 20px; background: transparent url(img.jpg) no-repeat; } .yo a:hover { background-position: -100px 0; } <div class="yo"> <a href="#">link</a> </div>
  4. just catch onMouseover event and write the swap code in javascript or css. Thanks http://www.ausfuhrung.com
Powered by Yahoo! Answers