Definition
The background-attachment property sets whether a background image is fixed or scrolls with the rest of the page.
Inherited: No
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.
Scripting Syntax: object.style.backgroundAttachment="fixed"
In our HTML DOM tutorial you can find more details about the backgroundAttachment property.
In our HTML DOM tutorial you can also find a full Style Object Reference.
Example:
body
{
background-image: url(stars.gif);
background-attachment: fixed
}
Attributes
| Applied_To |<a> <address> |
| |<b> <big> |
| |<blockquote> <body> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> currentStyle |
| |<custom> <dd> |
| |defaults <dfn> |
| |<dir> <div> |
| |<dl> <dt> |
| |<em> <fieldset> |
| |<form> <hn> |
| |<html> <i> |
| |<iframe> <img> |
| |<input type="button"> <input type="checkbox"> |
| |<input type="file"> <inputtype="image"> |
| |<input type="password"> <input type="radio"> |
| |<input type="reset"> <input type="submit"> |
| |<input type="text"> <isindex> |
| |<kbd> <label> |
| |<legend> <li> |
| |<listing> <marquee> |
| |<menu> <ol> |
| |<option> <p> |
| |<pre> runtimeStyle |
| |<s> <samp> |
| |<small> <span> |
| |<strike> <strong> |
| |style <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<tr> <tt> |
| |<u> <ul> |
| |<var> <xmp> |
Examples
Resources
http://www.java2s.com/Code/HTMLCSSReference/CSS-Attributes-and-Javascript-Style-Properties/backgroundattachmentisappliedto.htm
Comments (0)
You don't have permission to comment on this page.