top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Which property is used to control the scrolling of an image in the background in CSS?

0 votes
104 views
Which property is used to control the scrolling of an image in the background in CSS?
posted Jun 22, 2017 by Ankana Guchait

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

The background-attachment property is used to control the scrolling of an image in the background.

Example

.fixed-bg { 
    background-image: url('w3css.gif');
    background-repeat: no-repeat;
    background-attachment: fixed;  /* Set background image to fixed (don't scroll along with the page) */
}
answer Jun 23, 2017 by Ranjit Bera
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...