<html> <head> <style type="text/css"> body { background-image: url('smiley.gif'); background-repeat: no-repeat; background-attachment:fixed; background-position: 30% 20%; } </style> </head> <body> <p><b>Note:</b> For this to work in Mozilla, the background-attachment property must be set to "fixed".</p> </body> </html>
Your Result:
Edit the code above and click to see the result.
W3Schools.com
- Try it yourself