Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
background-attachment defines how a background image will be displayed when the content is scrolled. Values include scroll, fixed, and local.
Last updated on : 2023-03-20
Browser Versions
IE
Edge
Firefox
Chrome
Safari
Opera
Fully Supported
Partially
No Support
Inherited
no
Applies to
all elements. It also applies to ::first-letter and ::first-line.
Initial value
scroll
Animation type
discrete
Computed value
as specified
CSS Backgrounds and Borders Module Level 4 # the-background-attachment
/* Keyword values */
background-attachment: scroll;
background-attachment: fixed;
background-attachment: local;
/* Global values */
background-attachment: inherit;
background-attachment: initial;
background-attachment: revert;
background-attachment: unset;
CSS background-attachment on IE is fully supported on 9-11 and partially supported on 5.5-8 IE versions.
CSS background-attachment on Edge is fully supported on all Edge versions.
CSS background-attachment on Firefox is fully supported on 25-113 and partially supported on 2-24 Firefox versions.
CSS background-attachment on Chrome is fully supported on all Chrome versions.
CSS background-attachment on Safari is fully supported on 5.1-16.4, partially supported on 3.2-13, and not supported on 14.1-16.1 Safari versions.
CSS background-attachment on Opera is fully supported on 10.5-95 and partially supported on 9.5-10 Opera versions.
CSS background-attachment on Safari on iOS is partially supported on 5-12.2, and not supported on 3.2-16.4 Safari on iOS versions.
CSS background-attachment on Android Browser is partially supported on 4.2-4.1, and not supported on 2.1-111 Android Browser versions.
CSS background-attachment on Opera Mobile is fully supported on 11.5-73, partially supported on 10-10, and not supported on 64-64 Opera Mobile versions.
CSS background-attachment on Chrome for Android is fully supported on all Chrome for Android versions.
CSS background-attachment on Firefox for Android is fully supported on all Firefox for Android versions.
CSS background-attachment on Samsung Internet is partially supported on 5-20, and not supported on 4-4 Samsung Internet versions.
Data sourced from
Overall Browser Compatibility Score
Note:CSS background-attachment shows a browser compatibility score of 72. This is a collective score out of 100 to represent browser support of a web technology. The higher this score is, the greater is the browser compatibility. The browser compatibility score is not a 100% reflection for every browser and the web technology support. However, it does give you an estimate on how much you should rely on a particular web technology in terms of browser compatibility.
Test on 3000+ browsers for CSS background-attachment & more
Test your website for CSS background-attachment and other web technologies. Get 100 FREE automation test minutes!
Test NowKaneAI - Testing Assistant
World’s first AI-Powered E2E testing agent.
Did you find this page helpful?