Uploaded April 2016 | Updated November 2026, 49 minutes ago
The HTML / CSS method uses an image sprite to load all the rollover effects as a single image then CSS creates the rollover effect.
The CSS:
a.rollover {
display: block;
width: 150px;
height: 44px;
text-decoration: none;
background: url("rolloverimage.jpg");
}
a.rollover:hover {
background-position: -150px 0;
}
.displace {
position: absolute;
left: -5000px;
}
The HTML / CSS method uses an image sprite to load all the rollover effects as a single image then CSS creates the rollover effect.
The CSS:
a.rollover {
display: block;
width: 150px;
height: 44px;
text-decoration: none;
background: url("rolloverimage.jpg");
}
a.rollover:hover {
background-position: -150px 0;
}
.displace {
position: absolute;
left: -5000px;
}








