background-attachment: fixed;
Browser |
|
---|
The background-attachment property specifies whether a background image is fixed or scrolls.
Applying this property to the BODY element applies the specified style to background of an entire page.
body {
background-image: url(image/back.gif);
background-attachment: fixed;
}
Property | Value | Explanation |
---|---|---|
background-attachment | fixed | specifies the fixed |
scroll | specifies the scrolling (default) |
Example
<html>
<head>
<title>TAG index</title>
<style type="text/css">
body {
background-color: #ffffff;
background-image: url(image/back.gif);
background-attachment: fixed;
color: #000000;
}
</style>
</head>
<body>
</body>
</html>
- Output
-
back.gif
Example page