語法
滾動行為scroll-behavior
Setting the scrolling behavior for a scrolling box.
Overview
Class | Declarations |
---|---|
scroll-behavior:value | scroll-behavior: value;
|
scroll-behavior:auto | scroll-behavior: auto;
|
scroll-behavior:smooth | scroll-behavior: smooth;
|
Conditionally apply
Apply styles based on different states using selectors and applying conditionally.
<div class="scroll-behavior:auto:hover scroll-behavior:auto@sm scroll-behavior:auto@dark scroll-behavior:auto@print">…</div>