To replace images with CSS Sprites
1. Make a CSS class for every image in your sprite.png
2. add an empty division for every CSS class.
3. Replace the actual image reference with the new sprite reference.
Ex
.spritetwith {
background: url(“sprite.pngâ€Â) 0 0;
height: 25px;
width: 50px;
}
.spritebuff {
background: url(“sprite.pngâ€Â) -50px 0;
height: 25px;
width: 50px;
}
Ex. of the empty HTML Div
<div class=â€Âspritetwithâ€Â></div>
<div class=â€Âspritebuffâ€Â></div>
Replacing Images with CSS Sprites
To replace images with CSS Sprites
1. Make a CSS class for every image in your sprite.png
2. add an...
css sprites. replace images
&nsbp;
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users