X 归档 2025-09-27
using CSS grid you can avoid width change in the parent container whilst making it responsive 🤙
the trick: update and transition the grid-template-columns for the list on :focus/:hover ✨
the trick: update and transition the grid-template-columns for the list on :focus/:hover ✨
用 CSS grid 可以在保持响应式的同时避免父容器宽度变化 🤙
诀窍:在 :focus/:hover 时更新并过渡列表的 grid-template-columns ✨
诀窍:在 :focus/:hover 时更新并过渡列表的 grid-template-columns ✨
you can create this dynamic mask using a progressive CSS scroll-driven animation 🧑🍳
the gist 👇
input {
animation: in;
animation-timeline: scroll(self inline);
animation-range: 0 6ch;
mask-position: 0 0;
}
@keyframes in { 0% { mask-position: -6ch 0; }}
the gist 👇
input {
animation: in;
animation-timeline: scroll(self inline);
animation-range: 0 6ch;
mask-position: 0 0;
}
@keyframes in { 0% { mask-position: -6ch 0; }}
你可以用渐进式的 CSS 滚动驱动动画做出这种动态遮罩 🧑🍳
要点如下 👇
input {
animation: in;
animation-timeline: scroll(self inline);
animation-range: 0 6ch;
mask-position: 0 0;
}
@keyframes in { 0% { mask-position: -6ch 0; }}
要点如下 👇
input {
animation: in;
animation-timeline: scroll(self inline);
animation-range: 0 6ch;
mask-position: 0 0;
}
@keyframes in { 0% { mask-position: -6ch 0; }}
CSS macOS style dock nav with sub-menu 🤙
:has() for magnification ✅
[popover] for the sub-menu ✅
anchor() to tether the menu ✅
offset-path to put items on the curve ✅
linear() for the springy transition ✅
Combining cool APIs to create common UI patterns without JS ⭐️
:has() for magnification ✅
[popover] for the sub-menu ✅
anchor() to tether the menu ✅
offset-path to put items on the curve ✅
linear() for the springy transition ✅
Combining cool APIs to create common UI patterns without JS ⭐️
CSS 打造 macOS 风格带子菜单的 Dock 导航 🤙
:has() 实现放大效果 ✅
[popover] 实现子菜单 ✅
anchor() 把菜单系在触发元素上 ✅
offset-path 让菜单项沿弧线排布 ✅
linear() 实现弹簧般的过渡 ✅
组合多个酷炫 API,无需 JS 实现常见 UI 模式 ⭐️
:has() 实现放大效果 ✅
[popover] 实现子菜单 ✅
anchor() 把菜单系在触发元素上 ✅
offset-path 让菜单项沿弧线排布 ✅
linear() 实现弹簧般的过渡 ✅
组合多个酷炫 API,无需 JS 实现常见 UI 模式 ⭐️
progressive scroll blurring with CSS ✨
– translate progressive blurred layers on scroll
– tighten blur with contrast and brightness 👇
.blur-stack {
animation: drop;
animation-timeline: --scroller;
animation-range: 0 var(--size);
height: var(--size);
}
+ apply contrast for goo scroll
– translate progressive blurred layers on scroll
– tighten blur with contrast and brightness 👇
.blur-stack {
animation: drop;
animation-timeline: --scroller;
animation-range: 0 var(--size);
height: var(--size);
}
⤵
CSS progressive blur on scroll 📜+ apply contrast for goo scroll
滚动时的 CSS 渐进模糊 📜
+ 配合 contrast 做出粘糊的滚动效果
+ 配合 contrast 做出粘糊的滚动效果
