Css Sprite Navigation
Is it possible to use three images in CSS sprite navigation? This may be like this My image http://img710.imageshack.us/img710/1429/navigx.jpg If its possible what will be the resu
Solution 1:
Yes it is possible. See exaple here http://www.ehousestudio.com/blog/view/css_sprite_navigation_tutorial
Solution 2:
You can use any amount of images in a sprite, just move the positioning around in your CSS:
.sprite1
{
background-image:url(../../upload/btn_continue_sprite.png);
background-repeat:no-repeat;
background-position: -10px 5px;
}
.sprite1:hover
{
background-image:url(../../upload/btn_continue_sprite.png);
background-repeat:no-repeat;
background-position: -20px 10px;
}
.sprite2
{
background-image:url(../../upload/btn_continue_sprite.png);
background-repeat:no-repeat;
background-position: -30px 15px;
}
.sprite2:hover
{
background-image:url(../../upload/btn_continue_sprite.png);
background-repeat:no-repeat;
background-position: -40px 20px;
}
Just have to figure out the px distances to align the sprite to the element properly and you're away!
Hope that helps.
Solution 3:
You can use any number of images in a sprite. Depends on your requirement.
Post a Comment for "Css Sprite Navigation"