7.5 CSS Image Sprites
In the previous section, we used the a element not for its standard purpose of linking to a separate web page, but rather for loading an image into a frame within the current web page. In this section, we once again use the a element for something other than its standard purpose. We use it to implement a rollover. A rollover is when an image file changes due to the user moving the mouse over the image. Rollovers have been around for quite a long time. Early on, web programmers were limited in their ability to implement rollovers. They had to use JavaScript, which we’ll get to in the next chapter. In this section, you’ll take advantage of advances in CSS and learn how to implement rollovers without JavaScript. All you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access