Syntax
background-attachment
Setting whether position of background image is fixed when scrolling.
Overview
Class | Declarations |
---|---|
background-attachment:value | background-attachment: value;
|
bg:fixed | background-attachment: fixed;
|
bg:local | background-attachment: local;
|
bg:scroll | background-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>