background-attachment CSS Property

CSS property of background-attachment will set whether background image is fixed or scroll. If it is fixed, background image will not move with page scroll.

Definition Of background-attachment property:

The background-attachment property of CSS will set background image either fixed with page scroll or move with page scroll.

What background-attachment property can do?

If background-attachment is set to fixed, background image will remain fixed either document scroll moves or not. And if it sets to scroll, background image will move with document scroll.

How to use CSS background-attachment property?

Syntax:

1
background-attachment: fixed | scrol

Example:

1
background-attachment: fixed;

How to use CSS background-attachment property in Javascript?

You can set value of background-attachment property with Javascript in following manner:

1
object.style.backgroundAttachment = "fixed&quot


Related posts

Tags: ,

No Response

Post your response

Copyright © 2010 - 2013 Handy CSS Designed By Anotix, Powered By WordPress, all right reserved.