अवलोकन
backgroundAttachment प्रॉपर्टी बैकग्राउंड इमेज को स्क्रॉल के साथ फिक्स्ड (नहीं स्क्रॉल होने वाली) बनाती है।
उदाहरण
<!DOCTYPE html> <html> <body> <button onclick="display()">Click to Set background</button> <p>Demo Text</p> ... <script> function display() { document.body.style.background = "url('https://www.tutorialspoint.com/html5/images/html5-mini-logo.jpg') no-repeat right top"; document.body.style.backgroundAttachment = "fixed"; } </script> </body> </html>