Loading Please Wait...
CSS background-attachment property is used to define background image scroll behavior. It defines whether the image is fixed or scroll.
The background-attachment property can have following values:
fixed: background image is fixed relative to the viewport.
scroll: background is fixed relative to element itself and does not scroll with content.
local: background is fixed relative to element contents and scroll with content.
inherit: inherit from parent.
initial: initial as browser default.
revert: same as it would be if no changes were made.
revert-layer: same as back to the previous value.
unset: same as parent (like inherit) and if not inherited then back to browser default (like initial).
/* background attachment keywords */
background-attachment: fixed;
background-attachment: scroll;
background-attachment: local;
/* Global keyword value */
background-attachment: inherit;
background-attachment: initial;
background-attachment: revert;
background-attachment: revert-layer;
background-attachment: unset;
We can also define multiple background attachments with multiple background images.
background-image: url("image1.png"), url("image2.png");
background-attachment: fixed, scroll;
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved