top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

0 votes
532 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 LinkedIn 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

Your answer

Preview

Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...