<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Animation on Commentary of Takao</title><link>https://takao.blog/zh-tw/tags/animation/</link><description>Recent content in Animation on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Commentary of Takao</copyright><lastBuildDate>Wed, 15 Jul 2026 22:01:08 +0900</lastBuildDate><atom:link href="https://takao.blog/zh-tw/tags/animation/index.xml" rel="self" type="application/rss+xml"/><item><title>使用視圖轉換 API 實現平滑頁面轉換</title><link>https://takao.blog/zh-tw/web/css-view-transitions-single-page-api/</link><pubDate>Sat, 05 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh-tw/web/css-view-transitions-single-page-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-view-transitions-single-page-api-zh-tw.png" alt="Featured image of post 使用視圖轉換 API 實現平滑頁面轉換" /&gt;&lt;h2 id="介紹"&gt;介紹
&lt;/h2&gt;&lt;p&gt;提供動態頁面轉換是提升現代 Web 應用程式整體使用者體驗 (UX) 的關鍵因素。&lt;/p&gt;
&lt;p&gt;從歷史上看，為了在頁面導航之間平滑地變形或淡出元素，開發人員必須導入大量 JavaScript 庫，例如 Framer Motion 或 GAP。這些庫需要深度掛鉤渲染生命週期，以在對舊 DOM 節點進行動畫處理時延遲卸載。&lt;/p&gt;</description></item><item><title>CSS Scroll-Driven Animations: The Future of Scroll-Based 效果</title><link>https://takao.blog/zh-tw/web/css-scroll-driven-animations/</link><pubDate>Tue, 25 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh-tw/web/css-scroll-driven-animations/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-scroll-driven-animations-zh-tw.png" alt="Featured image of post CSS Scroll-Driven Animations: The Future of Scroll-Based 效果" /&gt;&lt;h2 id="the-problem-with-javascript-scroll-events"&gt;The Problem with JavaScript Scroll Events
&lt;/h2&gt;&lt;p&gt;Scroll-based effects have traditionally relied on JavaScript scroll event listeners running on the main thread, which often causes jank, dropped frames, and poor user experience. Even with passive listeners and &lt;code&gt;requestAnimationFrame&lt;/code&gt; throttling, layout thrashing remains a persistent issue. CSS Scroll-Driven Animations solve this by moving scroll tracking to the compositor thread, enabling smooth 60fps effects without any JavaScript overhead.&lt;/p&gt;
&lt;h2 id="key-concepts"&gt;Key Concepts
&lt;/h2&gt;&lt;p&gt;Three core concepts power this feature. A &lt;strong&gt;scroll-timeline&lt;/strong&gt; links an animation to the scroll position of a scroll container. A &lt;strong&gt;view-timeline&lt;/strong&gt; ties an animation to an element&amp;rsquo;s visibility within a scroll container. The &lt;strong&gt;animation-timeline&lt;/strong&gt; property binds a named animation to either timeline type. Use &lt;code&gt;timeline-scope&lt;/code&gt; to share timelines across elements in the DOM tree.&lt;/p&gt;</description></item></channel></rss>