Line Mask Reveal Text
行ごとにマスクリビール
Generation Prompt
【対象要素】 - サイト内のテキスト1箇所(見出し・キャッチコピー・リード文等)に適用する 【演出内容】 - 各行が自分の行の下から押し上げられるように、上の行から順に現れる - 行からはみ出した部分は隠れるので、行ごとに生えてくるように見える 【品質要件】 - 行ごとの時間差は120ms前後、1行あたり0.75秒 - 切り取り枠は行の高さぴったりにし、隣の行が覗かないようにする - prefers-reduced-motion 時は演出を無効化し、最初から完成した状態で表示する - 演出中も文字が判読できなくなる時間を作らない。レイアウトを揺らさない
[Target element] - Apply to one piece of text on your site (a heading, a tagline, a lead paragraph, etc.) [Motion] - Each line is pushed up from beneath its own line box, appearing from the top line down - Anything outside the line box is hidden, so each line grows into place [Quality requirements] - Stagger about 120ms per line, 0.75s per line - Clip exactly to the line height so the neighboring line never peeks through - When prefers-reduced-motion is set, disable the animation and show the finished state from the start - Never let the text become unreadable during the animation, and never shift the surrounding layout
Prompts and demo code are free to use in your own projects. See About.