Dialtone

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

ClassOutput
.d-bga-unsetbackground-attachment: unset !important;
.d-bga-scrollbackground-attachment: scroll !important;
.d-bga-fixedbackground-attachment: fixed !important;
.d-bga-localbackground-attachment: local !important;

Scroll

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


<div class="... d-bga-scroll">...</div>

Fixed

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


<div class="... d-bga-fixed">...</div>

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.


<div class="... d-bga-local">...</div>
Last Updated: