Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <style type="text/css"> body { background:#f3f3f3 url('img_tree.png') no-repeat right top; } </style> <script> function displayResult() { document.body.style.backgroundAttachment="fixed"; } </script> </head> <body> <button type="button" onclick="displayResult()">Set background image to be fixed</button> <br> <h1>Hello World!</h1> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> <p>This is a paragraph</p> </body> </html>
Result:
W3Schools.com - Try it yourself