WebConf Taiwan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 讓 CSS 動畫提升你的網站使用者體驗 - 李建杭 Amos {%hackmd o8oUosN0QnqMSkF1_6kH7g %} #### 📚 議程介紹 {%preview https://webconf.tw/agenda/41 %} ###### ▼▼▼ 開始筆記 ▼▼▼ ## 關於Amos * 設計轉職前端 * 熱愛CSS開發 * 厭惡智障使用者介面 * 金魚都能懂教學系列作者 ## Agenda - 網頁動畫常見的狀況 - 動畫與體驗注意事項 - 有哪些很棒的 CSS 動畫屬性 - 與 AI 協作 - 提升你的動畫敏感度,工程師跟設計都沒有動畫敏感度的話,會讓好的體驗消失 ## 理想與現實的衝突 ### 為何我們的「體驗魔術」總在實作中消失? * **設計師的理想** * 在 Figma 中,我們設計了絲滑、連續的體驗 * Tooltip 永遠緊貼目標,優雅地換位 * **工程師的現實** * 交付後,常聽到的回覆是: * 「這動畫太複雜,效能會拖垮」 * 「這需要巨大的 JS 函式庫,很麻煩」 * **結果** * 最終,許多 UX 的細節魔鬼,就這樣被犧牲了 ### 我們正在製造「認知斷裂」 違反大腦直覺的介面互動 #### 數位傳送(Digital Teleportation) **定義**: * 傳統網頁中,介面元素會瞬間移動至另一位置 **問題點**: * 違反「物體恆存(Object Permanence)」的心理學原則 * 使用者無法直覺理解元素是同一個,需額外負荷來確認:「這兩個是同一個東西嗎?」 **結果**: * 增加大腦認知負擔 * 干擾使用流程的連貫性與信任感 #### 關聯破裂(Broken Proximity) **定義**: * Tooltip 或選單與觸發元件被視覺上切斷 **問題點**: * 違反「接近性法則」,打破格局與視覺結構 * 元素位置混亂,視覺關聯變得模糊 **結果**: * 使用者無法建立穩定的界面預期 * 增加操作上的不確定與挫折感 ![IMG_3883](https://hackmd.io/_uploads/rJokhBcfbx.jpg) ### 快?慢?時間控制帶來質感 * 即時反應(Instantaneous) * 平順過渡(Smooth Transition) * 延遲/等待(Delay / Loading) * 設計洞察:EASING #### 適用情境 * 即時反應:選單、卡片 * 平順過度:頁面切換、Drawer、Modal * 延遲等待:進度條、Loading ![IMG_3884](https://hackmd.io/_uploads/S14bnHcGZl.jpg) 動畫不是做得多、做的炫就好,體驗感還是很重要 >[name=Amos]對官網評價:選單hover會被擋住,動畫過多焦點模糊 ### 精心設計的舞台劇不會讓你感到混亂 Principle 1:舞台編排(Choreography) - 控制焦點 * 任何時刻只能有一個「主角」動畫,配角動畫必須是柔和、延遲的以創造背景感 Principle 2:感知分離(Perceptual Separation) - 隱藏複雜性 * 流暢的過渡本來就是對複雜性最好的掩蓋 * view transition 會讓換頁非常的順暢 ### 從心理學到程式碼:你的動畫檢查清單 - 速度 Speed - **心理學目標**:實現平順過渡 - **設計原則**:速度需恰當、優雅結束 - 方向 Direction - **心理學目標**:建立空間合理感 - **設計原則**:進入與退出的方向需一致,避免使用者迷失 - 消失/顯示 Appearance - **心理學目標**:有目的地引導注意力 - **設計原則**:動畫需清晰傳達出現或消失的過程 - 大小 Size - **心理學目標**:傳遞層級與優先權 - **設計原則**:變大代表重要,變小代表內容內縮 - 延續性 Continuity - **心理學目標**:維持空間恆定與連貫性 - **設計原則**:確保動畫過程中元素位置與狀態不跳動,維持視覺穩定 ### CSS 不再只是「樣式」語言,它是「網站互動細節的邏輯語言」 * View Transitions API:連續性(Continuity)—解決換頁時的「瞬間傳送」問題,讓頁面流暢。 * Anchor Positioning:關聯性(Proximity) 一解決定位時的「跑版斷裂」問題,讓元素精準。 * Scroll Snap:終點(Closure)一解決滾動時的「不穩定終點」問題,讓滾動穩定。 Curing Digital Teleportation with View Transitions (用 View Transitions 治癒數位瞬移) Key Insight: 瀏覽器原生支援 DOM 狀態的「快照」轉場,將過去數百行 JS 的複雜動畫簡化。 ### 使用 View Transitions 解決數位傳送問題 ### View Transitions in Action:實現視覺連續性的程式碼作法 ![IMG_2566](https://hackmd.io/_uploads/Sy-hzUqfbx.jpg) ### Anchor Positioning ![IMG_2567](https://hackmd.io/_uploads/rJOlQU5MWg.jpg) ![IMG_2568](https://hackmd.io/_uploads/Byux789zbl.jpg) ### Perfect Landings, Every Time with Scroll Snap ### From Compromise to Empowerment ### 未來工作流:AI 處理繁瑣,我們專注創意 AI處理動畫的數學與優化,人專注高層次創意與UX策略 ### 鍛鍊你的動態直覺:從「看見」到「感受」的修煉 將你的生活直覺和物理知識應用到數位介面上 - 拆解分析 - 錄製優秀 APP 動畫,慢動作分析其時長(Duration)、曲線(Easing)與屬性(Property),將視覺效果數據化。 - 實驗模仿 - 寫看看不同參數帶來的心理感受 - 如果聽完這場沒去感受,真的會沒感覺 - 很多時候是沒有標準答案的 - 第一性原理,思考最終想要創造什麼,再回推 - 情境內化 - 將介面動畫與現實世界的物理直覺連結 ### 複雜而不雜亂:流暢過度是複雜性最好的掩護 - 核心原則一:舞台編排(Choreography) - 控制焦點 - 主角動畫: - 使用者操作的直接反饋(如View Transition),時間較長(例:300ms) - 配角動畫: - 背景元素的柔和、延遲淡入,時間較短,且有延遲 - 核心原則二:感知分離(Perceptual Separation) - 隱藏複雜性 - 在 View Transition 的流暢動畫過程中,瀏覽器在背後處理複雜的 DOM 元素重排。使用者因為「連續性」的滿足,感覺整個流程簡潔、一氣呵成 ### 進階課題:多物件動畫的編排藝術 ![IMG_6503](https://hackmd.io/_uploads/SyRvmL5fbx.jpg) 避免視覺混亂,創造如舞台劇般的節奏感 - 序列化進場(Sequential Entrance) - 元素應遵循資訊的是層次 - 聚合式離場 - 統一慣性 ### 總結:從妥協到賦能的現代 CSS | 認知問題 | 心理學原則 | 現代 CSS 解決方案 | | --------- | ----- | ------------------ | | 頁面切換的斷裂感 | 物體恆存 | View Transitions | | 浮動元素的錯位 | 接近性法則 | Anchor Positioning | | 滾動體驗的不確定性 | 閉合法則 | Scroll Snap & SDA | | 決策與優化的耗時 | 效率與精準 | AI 賦能工作流 | > scroll-triggered animation 20251212 剛發佈 值得關注 ### 結語 ==好的動畫不只是好看,更有減輕認知負荷、建立空間心智模型、引導使用者注意力的重要作用與目的。== --- #### 聊天區 可是我喜歡圓角跟玻璃耶... Amos:其實我也喜歡,但個人體感上圓角太大了,像是筆電上的視窗邊緣,在操作上會出現不精準的模糊空間,加上介面回應與提示不足的話,操作性就會掉。但你跟我的體感差異也就是我這場演講想要傳遞的,每個人體感不同,但若都能提出自己對介面或動畫的看法與感受,思維與想法就會更廣,進而碰撞出更多更棒的想法與改善體驗。 有人喜歡有人不喜歡 謝謝筆記超人們和排版超人們~~ 🙏🙏 謝謝筆記超人們 路人: 阿捏我還是蠻想要簡報的...

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully