Fixed Background Image with CSS

21 Jul

CSS has attribute to set your background image fixed, meaning the background will be still, not moving even you scroll up and down.

    background: url("../images/BackgroundPattern.jpg");
    background-attachment: fixed;

By setting the background attachment to fixed, your background will be static and only your content will be moving when the page is scrolled.

Leave a comment

Posted by on July 21, 2011 in General


Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: