Javascript Reference
Categories: STYLE

javascript STYLE backgroundAttachment

@March 15, 2008, 1:22 a.m.
backgroundAttachmentFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Sets how the image is "attached" to the element. The image can either remain fixed within the viewable area of the element (the viewport) or it may scroll with the element as the document is scrolled. During scrolling, the fixed attachment looks like a stationary backdrop to rolling credits of a movie.

 
Example
 
document.getElementById("myDiv").style.backgroundAttachment = "fixed";
 
Value

String of either allowable value: fixed | scroll.

 
Default

scroll


Powered by Linode.