Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)
The CSS 'background-attachment' property specifies whether a background image should scroll with the content or be fixed about the viewport. This property can be used to create various effects, such as a parallax scrolling effect or ensuring that a background image remains static as the user scrolls through a webpage.
See the Pen
CSS 'background-attachment' Property by Webzstore (@webzstore)
on CodePen. The 'background-attachment' property offers creative control over how background images interact with page scrolling, allowing for diverse design strategies that can enhance a website's aesthetic and user experience. Use 'background-attachment' to control the scrolling behavior of background images. It's beneficial for adding visual depth to a webpage or creating specific visual effects that enhance the user's experience. For instance, a fixed background image can create a sense of immersion, while a scrollable background can maintain context as content moves.CSS 'background-attachment' Property Example
Browser Support For 'background-attachment' Property
1.0 1.0 1.0 4.0 3.5 CSS Syntax of the 'background-attachment' Property
background-attachment: scroll | fixed | local | initial | inherit;
Usage of the 'background-attachment' Property
Property Values of the 'background-attachment' Property
"*" indicates required fields