Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <style> body { background: #ccc url("/build/images/w3docs-logo-black.png") no-repeat fixed center; } </style> </head> <body> <h2>Background property example</h2> <p>In this example background property specifies the background-color, the background-image property to set the image to the background, background-repeat to specify the image to be non repeated, background-attachment to specify the image to be fixed and background-position to specify the image to be in center.</p> </body> </html>