Property: Background Attachment
Usage:
background-attachment: scroll;
background-attachment: fixed;
Definition:
This tag sets the property of how the background image should behave. Whether it should scroll with the page or be static.
It takes the following values.
a)scroll : The image will scroll with the page
b)fixed : The image will not scroll with the page. It will be static. The content will be moving but not the image
Examples:
<body style="background-image: url('test3.jpg'); background-repeat: no-repeat; background-position: center; background-attachment: scroll;"> color name
<br><br><br></body>
<body style="background-image: url('test3.jpg'); background-repeat: no-repeat; background-position: center; background-attachment: fixed;"> color name
<br><br><br></body>
Results:
with scroll:
It the default behaviour.
with fixed:
The image shown in this page is an example of fixed.
Thus we can get the non movable / immovable background image.
|