पृष्ठभूमि में किसी छवि की स्क्रॉलिंग सेट करने के लिए, पृष्ठभूमि-अनुलग्नक . का उपयोग करें संपत्ति।
उदाहरण
पृष्ठभूमि-अनुलग्नक . के साथ काम करने का तरीका जानने के लिए आप निम्न कोड चलाने का प्रयास कर सकते हैं संपत्ति:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('/css/images/css.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-attachment:scroll;
}.
</style>
</head>
<body>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
</body>
</html>