Forcing a background to a static background

I have a background created using the following css:

<body onload='javascript:initializeQuiz()' style='background-image:url("images/bi.png");background-repeat:repeat;font-family:Arial'> 

This is a repeating picture of some kind of "binary" (just a bunch of random 0 and 1 for a dramatic effect). When I scroll, background scrolls too. How to make the background image not scrollable, but allow scrolling of text and images from above?

Thanks if you can!

+3
source share
2 answers

Add background-attachment:fixed;to your style attribute:

<body onload='javascript:initializeQuiz()' style='background-image:url("images/bi.png");background-repeat:repeat;font-family:Arial;background-attachment:fixed;'>

+6
source

All Articles