BACKGROUND ATTACHMENT Syntax of background attachment is
body {
background-image: url("Helloworld.jpg");
background-attachment: fixed;
}
There are two types of Attachments
For eg:
- Scroll
Program
- Fixed
INPUT
<!DOCTYPE html> <html> <head> <style> body { background-image: url("World.jpg"); background-position: right top; background-attachment: fixed; } </style> </head> <body> <h1>BACKGROUND-ATTACHMENT</h1> <p>Now you can see we have scrolled the page but image noy moved with it X50</p> </body> </html>.
OUTPUT
![]()