短评 · ·

X 归档 2024-06-26

1 条动态 · 图 0 · 视频 1
@jh3yy08:08原推文
Responsive inverted reveal scroller with CSS 🤙

img {
position: fixed;
animation: clip;
animation-timeline: --section;
animation-range: exit;
}
@​keyframes clip { to { clip-path: inset(100% 0 0 0); }

Fix the image, animate clip on parent scroll position (--section) ✨
用 CSS 做响应式的反向揭示滚动效果 🤙

img {
position: fixed;
animation: clip;
animation-timeline: --section;
animation-range: exit;
}
@keyframes clip { to { clip-path: inset(100% 0 0 0); }

固定图片,在父级滚动位置(--section)上做 clip 动画 ✨