You are here: Reference > HTML > attributes > bgProperties (body)

bgProperties attribute (body)

Browser support:
Sets whether the background picture, specified by the background attribute, is fixed or scrollable.
This attribute is deprecated. Use the background-attachment style property instead.
JavaScript page for this attribute: bgProperties. You can find other example(s) there.

Possible values:

String that sets the state of the scrolling.
One of the following values:
empty string
Default. Background picture can be scrolled.
fixed
Background picture is fixed and cannot be scrolled.
Default: empty string.

Example HTML code 1:

This example illustrates the use of the bgProperties attribute:
<body background="bg.gif" bgproperties="fixed">
    ...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />
    ...<br />...<br />Scroll the document body!<br />...<br />
    ...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />
</body>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the background-attachment style property:
<body style="background:url(bg.gif) fixed repeat;">
    ...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />
    ...<br />...<br />Scroll the document body!<br />...<br />
    ...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content