I was working with an image for a background and trying to make it the right perfect size to fit a variety of screen sizes while still showing the important pieces in all sizes. The following fix did exactly what I was looking for in css. Props to
http://css-tricks.com/3458-perfect-full-page-background-image/ for the awesome fix :)
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;
}
No comments:
Post a Comment