Search

5/08/2012

background-size

CSS3 background-size property

background-size:
cover: Scale the image to the smallest size such that both its width and its height can fit inside the content area
contain: Scale the image to the largest size such that both its width and its height can fit inside the content area
CSS background-attachment property
scroll: The background image scrolls with the rest of the page. This is default
fixed: The background image is fixed
Perfect Full Page Background Image | CSS-Tricks
html {
 background: url(images/bg.jpg) no-repeat center center fixed;
 -webkit-background-size: cover;
 -moz-background-size: cover;
 -o-background-size: cover;
 background-size: cover;
}
demo:
http://chunghe.googlecode.com/svn/trunk/experiment/css3/background-size.htm

沒有留言: