AIGPAIGP

GSAP ScrollTrigger Text Reveal Animation

P

Prompt

Create a text reveal animation using GSAP ScrollTrigger where each character appears with a sliding effect as the user scrolls.

CODE PREVIEW

Customize Code with AI

AI rewrites this code based on your instructions. Preview is free; copy & download unlocked for ¥100.

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

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

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

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

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

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

This implementation demonstrates a sophisticated text reveal animation using GSAP ScrollTrigger. Each character in the target text elements is wrapped in a span with the class 'char', which initially has opacity: 0 and a vertical offset. As the user scrolls through the content section, ScrollTrigger triggers the animation sequence, making each character slide into position with a staggered delay.

The animation uses power2.out easing for smooth motion and includes a subtle parallax effect on the hero title that fades out as the user scrolls down. The splitTextIntoChars function handles the character wrapping, ensuring spaces are preserved with non-breaking spaces.

This technique creates an engaging, magazine-like reading experience that can be easily customized for different text styles and scroll behaviors.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / クレジットカード対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ
GSAP ScrollTrigger Text Reveal Animation | 探せる、試せる、生成AIプロンプト集-AIGP | 探せる、試せる、生成AIプロンプト集-AIGP