CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise


CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS background attachment Property

CSS background-attachment Property



The background-attachment property is used to determine whether a background image scrolls with the rest of the page or is fixed.


Default Value:-


Its default value is scroll.




Its syntax is:- background-attachment: scroll | fixed | local | initial | inherit;


Further Explanation:-


Value Description
scroll The background image will scroll with the page.
fixed The background image will not scroll with the page
local The background image will scroll with the element's contents
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS