Search

1/12/2009

Background repeat and CSS sprites

Background repeat and CSS sprites

The rule is pretty simple: if you want the background to repeat vertically (top to bottom), place the images in the sprite horizontally (left to right) and make sure the individual images in the sprite have the same height. For the opposite case: when you want to repeat horizontally, sprite vertically.

demo:
http://www.phpied.com/wp-content/uploads/2008/04/sp.html

沒有留言: