GSAP ScrollTrigger Text Reveal Animation Prompt Example
CODE PREVIEW
Prompt
Create a text reveal animation using GSAP ScrollTrigger where text elements slide in and fade as the user scrolls. The animation should be smooth and responsive.
このチュートリアルでは、GSAP ScrollTriggerを使用してスムーズなテキスト表示アニメーションを作成する方法を紹介します。ページをスクロールダウンすると、テキスト要素が異なる方向からスライドインし、フェード効果が適用されます。
実装では、GSAPのScrollTriggerプラグインを使用して、スクロール位置に基づいてアニメーションをトリガーします。各テキスト要素には、ビューポートに入ったときに開始される独自のアニメーションタイムラインがあります。
主な機能:
- 左右交互にスライドするテキスト
- 透明度遷移によるフェードイン効果
- 見出しのスケールアニメーション
- コンテンツブロックの背景色遷移
- すべてのデバイスで動作するレスポンシブデザイン
- power2.outによるスムーズなアニメーションイージング
コードは簡単にカスタマイズできるように構成されており、アニメーションプロパティ、タイミング、トリガーをデザインのニーズに合わせて調整できます。
Prompt Overview
This prompt targets front-end developers and creative coders who want to add polished scroll-driven text animations to a webpage using GSAP and its ScrollTrigger plugin. By requesting a slide-in and fade effect tied to the user's scroll position, the prompt produces clean, ready-to-use JavaScript code that can be dropped into any HTML project with minimal adjustment. It is especially useful for landing pages, portfolios, and marketing sites where first impressions matter and smooth motion design helps guide the reader's eye down the page.
To get the best results, use this prompt with a code-focused model such as GPT-4o or Claude 3.5 Sonnet, and specify your target elements — headings, paragraphs, or list items — along with any preferred easing curves or stagger timing. Variations worth exploring include per-character reveal animations, pinned scroll sections, or combining ScrollTrigger with GSAP timelines for multi-step sequences. Because the prompt explicitly requests responsiveness, the generated code should adapt gracefully across screen sizes, saving significant debugging time.
Was this prompt helpful?
Comments
Comments appear after moderation
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選