Saturday, July 24, 2010

Css tips and tricks [3] : Enable body background scaling

image

image (1)

Window width: 800px      Window height: 600px

Viewport width: 784px   Viewport height: 375px

image

image (2)

Window width: 1296px    Window height: 786px

Viewport width: 1280px    Viewport height: 561px

You can enable background scaling by adding the following declarations to your style sheet:

Css
body {
  background: #000 url(finalbg.jpg) center center fixed no-repeat;
  -moz-background-size: cover;
  background-size: cover;
}


1 comments:

  1. Thanks for such useful review. Don't forget to buy protection for your house, try cheap homeowners insurance
    ReplyDelete