Syntax

background-attachment

Setting whether position of background image is fixed when scrolling.

Overview

ClassDeclarations
background-attachment:valuebackground-attachment: value;
bg:fixedbackground-attachment: fixed;
bg:localbackground-attachment: local;
bg:scrollbackground-attachment: scroll;

Conditionally apply

Apply styles based on different states using selectors and applying conditionally.

<div class="background-attachment:scroll:hover background-attachment:scroll@sm background-attachment:scroll@dark background-attachment:scroll@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy