Is it possible to use CSS sprites for \"foreground\" images -- i.e. images that users are supposed to click on and interact with and maybe even print?
Instead of usi
You can do this with less CSS like this:
.myClass { background: url(../Images/Sprite.png) no-repeat;
height: 20px;
width: 40px;
background-position: -40px 0;
display: block; }
.myClass:hover { background-position: -40px -20px; }
Whatever has the class It's a background image...but it's the element you're looking at, nothing's in front of that background. Just because you're using class="myClass"
will have just the image in it, nothing else. This can be a an
or a normal
background-image
for the property doesn't mean it's not a foreground element...like a button you can click on. You can do that like this: