Closed huan5678 closed 7 months ago
feat: 使用 GSAP 滾動動畫增強 HomeView
src/main.js
src/views/HomeView.vue
The latest updates on your projects. Learn more about Vercel for Git ↗︎
feat: 使用 GSAP 滾動動畫增強 HomeView
src/main.js
中添加 GSAP 和 ScrollTrigger 庫以實現動畫效果src/main.js
中註冊 ScrollTrigger 插件並更新 GSAP 導入src/views/HomeView.vue
中添加 overflow-hidden 以及對元素的動畫引用src/views/HomeView.vue
中為各種 HTML 元素添加 ID 和 refs,以便使用 GSAP 進行動畫處理src/views/HomeView.vue
中實現掛載時初始化 GSAP 和 ScrollTrigger 以及卸載時清理src/views/HomeView.vue
中整合 GSAP 的詳細動畫時間線,用於滾動時各元素的動畫效果