CSS Home
CSS Reference
Pseudo Classes & Elements
© 2013 TutorialsPoint.COM
|
CSS - background-attachment
Advertisements
Description:
background-attachment determines the tiling context and scroll state of a background image.
Possible Values:
- scroll: A background image set to scroll will scroll along with the rest of the document.
- fixed: A background image set to fixed will remain locked in place while the rest of the document scrolls.
Applies to:
All the HTML elements.
DOM Syntax:
|
object.style.backgroundAttachment= scroll | fixed;
|
Example:
<p style="background-image:url(/images/pattern1.gif);
background-attachment:scroll;">
This parapgraph has scrolling background image.
</p>
|
To Become more comfortable - Do Online Practice
Advertisements
|
|
|