---
title: "X 归档 2025-09-27"
date: "2025-09-27"
tags:
  - x-archive
  - frontend
  - apple
---

<div class="x-arch-meta">4 条动态 · 图 0 · 视频 4</div>
<div class="x-arch-day">
  <div class="x-arch-item">
    <input type="radio" name="xl-1971783870992601229" id="xl-1971783870992601229-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1971783870992601229" id="xl-1971783870992601229-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/jh3yy" target="_blank" rel="nofollow noopener" data-name="jhey ʕ•ᴥ•ʔ" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg">@jh3yy</a><span class="x-arch-time">11:48</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1971783870992601229-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1971783870992601229-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/jh3yy/status/1971783870992601229" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">using CSS grid you can avoid width change in the parent container whilst making it responsive 🤙<br /><br />the trick: update and transition the grid-template-columns for the list on :focus/:hover ✨</div>
    <div class="x-arch-text x-arch-trans">用 CSS grid 可以在保持响应式的同时避免父容器宽度变化 🤙<br /><br />诀窍：在 :focus/:hover 时更新并过渡列表的 grid-template-columns ✨</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2025-09/1971783870992601229-poster.jpg" src="/cdn-media/x/2025-09/1971783870992601229-video.mp4" width="720" height="720" data-duration="20" aria-label="@jh3yy 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1971785914541330552" id="xl-1971785914541330552-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1971785914541330552" id="xl-1971785914541330552-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/jh3yy" target="_blank" rel="nofollow noopener" data-name="jhey ʕ•ᴥ•ʔ" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg">@jh3yy</a><span class="x-arch-time">11:56</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1971785914541330552-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1971785914541330552-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/jh3yy/status/1971785914541330552" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">you can create this dynamic mask using a progressive CSS scroll-driven animation 🧑‍🍳<br /><br />the gist 👇<br /><br />input {<br />animation: in;<br />animation-timeline: scroll(self inline);<br />animation-range: 0 6ch;<br />mask-position: 0 0;<br />}<br />@​keyframes in { 0% { mask-position: -6ch 0; }}</div>
    <div class="x-arch-text x-arch-trans">你可以用渐进式的 CSS 滚动驱动动画做出这种动态遮罩 🧑‍🍳<br /><br />要点如下 👇<br /><br />input {<br />animation: in;<br />animation-timeline: scroll(self inline);<br />animation-range: 0 6ch;<br />mask-position: 0 0;<br />}<br />@​keyframes in { 0% { mask-position: -6ch 0; }}</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2025-09/1971785914541330552-poster.jpg" src="/cdn-media/x/2025-09/1971785914541330552-video.mp4" width="720" height="720" data-duration="40" aria-label="@jh3yy 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1971796591096058260" id="xl-1971796591096058260-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1971796591096058260" id="xl-1971796591096058260-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/jh3yy" target="_blank" rel="nofollow noopener" data-name="jhey ʕ•ᴥ•ʔ" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg">@jh3yy</a><span class="x-arch-time">12:38</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1971796591096058260-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1971796591096058260-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/jh3yy/status/1971796591096058260" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">CSS macOS style dock nav with sub-menu 🤙<br /><br />:has() for magnification ✅<br />[popover] for the sub-menu ✅<br />anchor() to tether the menu ✅<br />offset-path to put items on the curve ✅<br />linear() for the springy transition ✅<br /><br />Combining cool APIs to create common UI patterns without JS ⭐️</div>
    <div class="x-arch-text x-arch-trans">CSS 打造 macOS 风格带子菜单的 Dock 导航 🤙<br /><br />:has() 实现放大效果 ✅<br />[popover] 实现子菜单 ✅<br />anchor() 把菜单系在触发元素上 ✅<br />offset-path 让菜单项沿弧线排布 ✅<br />linear() 实现弹簧般的过渡 ✅<br /><br />组合多个酷炫 API，无需 JS 实现常见 UI 模式 ⭐️</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2025-09/1971796591096058260-poster.jpg" src="/cdn-media/x/2025-09/1971796591096058260-video.mp4" width="720" height="720" data-duration="33" aria-label="@jh3yy 的视频"></video>
  </div>
  <div class="x-arch-item">
    <input type="radio" name="xl-1971798421830045891" id="xl-1971798421830045891-zh" class="x-arch-lang-input x-arch-lang-input-zh" checked aria-label="显示译文" /><input type="radio" name="xl-1971798421830045891" id="xl-1971798421830045891-orig" class="x-arch-lang-input x-arch-lang-input-orig" aria-label="显示原文" /><div class="x-arch-head"><img class="x-arch-avatar" src="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg" alt="" loading="lazy" referrerpolicy="no-referrer" /><span class="x-arch-kind x-arch-kind-posted" aria-label="发" title="发"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" /></svg></span><a class="x-arch-author" href="https://x.com/jh3yy" target="_blank" rel="nofollow noopener" data-name="jhey ʕ•ᴥ•ʔ" data-avatar="https://twimg.tweb.xin/twimg/profile_images/1534700564810018816/anAuSfkp_bigger.jpg">@jh3yy</a><span class="x-arch-time">12:45</span><span class="x-arch-lang-switch" role="group" aria-label="切换原文/译文"><label for="xl-1971798421830045891-zh" class="x-arch-lang-opt x-arch-lang-zh">译</label><label for="xl-1971798421830045891-orig" class="x-arch-lang-opt x-arch-lang-orig">原</label></span><a class="x-arch-link" href="https://x.com/jh3yy/status/1971798421830045891" target="_blank" rel="noopener">原推文<svg class="x-arch-ext" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10v10" /><path d="M7 17 17 7" /></svg></a></div>
    <div class="x-arch-text x-arch-orig">progressive scroll blurring with CSS ✨<br /><br />– translate progressive blurred layers on scroll<br />– tighten blur with contrast and brightness 👇<br /><br />.blur-stack {<br />  animation: drop;<br />  animation-timeline: --scroller;<br />  animation-range: 0 var(--size);<br />  height: var(--size);<br />}
    <div class="x-arch-thread-sep" aria-label="接上文">⤵</div>
    CSS progressive blur on scroll 📜<br /><br />+ apply contrast for goo scroll</div>
    <div class="x-arch-text x-arch-trans">滚动时的 CSS 渐进模糊 📜<br /><br />+ 配合 contrast 做出粘糊的滚动效果</div>
    <video class="x-arch-video" preload="none" playsinline poster="/cdn-media/x/2025-09/1971798421830045891-poster.jpg" src="/cdn-media/x/2025-09/1971798421830045891-video.mp4" width="720" height="720" data-duration="36" aria-label="@jh3yy 的视频"></video>
  </div>
</div>
