Pages

Wednesday 25 July 2012

CSS - Fixed background on scrolling


   Hi everyone!!
              
                  If you ever wondered how to make the background fixed to the page and to slide the contents on it as we scroll down, here is the very simple method...



Add the following to the class used for div or table you use as major content holder..


.nameofclass
{
background : url(yourimagepathhere);
background-attachment : fixed;
}

     Hope this post is beneficial....We may use it in combination with other properties to create amazing effects...will be shown in posts to follow...

No comments:

Post a Comment