AIGPAIGP

GSAP ScrollTrigger Text Reveal Animation Prompt Example

P

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.

CODE PREVIEW

エディタを読み込み中…

AIとの対話に追加する一言

プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします

このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。

初心者なので、各行にコメントを追加して、何をしているか説明してください。

このコードをWordPressのテーマに組み込む方法も教えてください。

動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。

このチュートリアルでは、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選

見る
Homeヘルプ