I'm a big sprite lover, but. I thought I was doing my whole long arm, so I was wondering if there was a shortcut.
In essence, creating a sprite is very simple. Making sprites work is easy, but making a lot of sprites becomes time consuming.
So it was interesting, what is the cleanest way to make multiple sprites that I can position anywhere on our web pages. I saw several sprite sheets similar to jquery ui, but we have our own icons. So it was interesting if there is a cleaner method.
We will have about 16 to 20 sprites at our disposal. Below is an example of html and css.
# logo-link
{
width: 32px;
height: 32px;
text-decoration: none;
display: block;
background-image: url (sprites / analytics.png);
background-position: 0 32px;
}
# logo-link: hover, # logo-link: active {background-position: 0 0; }
# logo-link2
{
width: 32px;
height: 32px;
text-decoration: none;
display: block;
background-image: url (sprites / addlisting.png);
background-position: 0 32px;
}
# logo-link2: hover, # logo-link2: active {background-position: 0 0; }
html
<a href="link1.html" id="logo-link"> </a>
<a href="link2.html" id="logo-link2"> </a>
Any thoughts on improving our sprites. Or should we create a sprite sheet with all the sprites?
Sample Image:


Added main sprite sheet on x axis

Example:

Ok Guys:
So far I have this in css:
.sprite
{
width: 32px;
height: 32px;
text-decoration: none;
display: block;
background-image: url (sprites / spritesheet.png);
}
.addlisting {background-position: 0 32;}
.addlisting: hover {background-position: 0 0;}
.addanalytics {background-position: 64 32;}
.addanalytics: hover {background-position: 64 0;}
.addprofile {background-position: 32 32;}
.addprofile: hover {background-position: 32 0;}
html I have:
<a href="link2.html" class="sprite addlisting"> </a>
<a href="link2.html" class="sprite addanalytics"> </a>
<a href="link2.html" class="sprite addprofile"> </a>
, (. spritesheet.png, , 32,32 64,32
, lol
, argghhh
, , , lol
:
! [alt text] [5]
.