Tutorials Point


  CSS Home

  CSS Reference
  Pseudo Classes & Elements

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

CSS - background-attachment


next AddThis Social Bookmark Button


Advertisements
next

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



next next Printer Friendly

Advertisements


  

Advertisements