語法
動畫填充模式animation-fill-mode
Setting how a CSS animation applies styles to its target before and after its execution.
Overview
Class | Declarations |
---|---|
@fill:mode,… | animation-fill-mode: mode,…;
|
@fill:none | animation-fill-mode: none;
|
@fill:forwards | animation-fill-mode: forwards;
|
@fill:backwards | animation-fill-mode: backwards;
|
@fill:both | animation-fill-mode: both;
|
from
origin
to
Simplify the native syntax using the derived symbol.
<div class="animation-fill-mode:both"><div class="@fill:both">
Conditionally apply
Apply styles based on different states using selectors and applying conditionally.
<div class="@fill-mode:none:hover @fill-mode:none@sm @fill-mode:none@dark @fill-mode:none@print">…</div>