Background Attachment

Utilities for controlling the way an element's background image position is fixed within the viewport or scrolls with its containing block.

Classes

Class Output
.d-bga-unset background-attachment: unset !important;
.d-bga-scroll background-attachment: scroll !important;
.d-bga-fixed background-attachment: fixed !important;
.d-bga-local background-attachment: local !important;

Scroll

Use d-bga-scroll to fix a background image to the element. It does not scroll with its content.

Fixed

Use d-bga-fixed to fix a background image to the viewport. The background image does not scroll with the content.

Local

Use d-bga-local to fix a background image relative to the element's contents. If the element is scrollable, the background scrolls with the element's contents, and background area and positioning are relative to the scrollable area of the element rather than the viewable box.