
テキストが動くボタンホバーアニメーションを実装したい……



テキストに魅力的な効果を与えたい……
今回はこのようなお悩みをお持ちの方へ向けて
Web制作において人気の高いアニメーション効果
テキスト系ボタンホバーアニメーション
をご紹介します。
- テキストスライド(テキストがスライドする効果)
- テキストフェード(テキストがフェードする効果)
- テキストスケール(テキストがスケールする効果)
- テキスト回転(テキストが回転する効果)
- テキストグロー(テキストが光る効果)
- テキストストローク(テキストのストロークが変化する効果)
- テキスト変形(テキストが変形する効果)



特にCTAボタンやナビゲーションボタンには、テキスト系ボタンホバーアニメーションが非常に効果的です。この記事のコードをご活用いただきWeb制作の効率化に繋がれば何よりです!
なお、今回ご紹介するアニメーションはCSSのみで実装するので、JavaScriptが不要で軽量なインタラクションを実現できます。
あわせて読みたい
テキスト系ボタンホバーアニメーションとは
テキスト系ボタンホバーアニメーションは、ボタン内のテキストに動的な変化を与えるアニメーションです。ユーザーの注目を集め、インタラクションを促進するための手法です。
効果的な使用場面
適している場面
- CTAボタン(Call to Action)
- ナビゲーションボタン
- アクションボタン
- フォームボタン
- メニューボタン
避けるべき場面
- 過度に複雑なアニメーション
- 読みやすさを重視する場面
- アクセシビリティを重視する場面
- 過度に使用した場合
実装方法の比較
アニメーション | 難易度 | 視覚的インパクト | パフォーマンス | ブラウザ対応 |
---|---|---|---|---|
テキストスライド | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
テキストフェード | ⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
テキストスケール | ⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
テキスト回転 | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
テキストグロー | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
テキストストローク | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
テキスト変形 | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
テキストスライド
① デモ
See the Pen テキストスライド by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストがスライドする効果
- 動的な表現
- 視覚的インパクト大
- モダンな印象
② HTML
<div class="button-container">
<button class="text-slide-btn">
<span class="btn-text-original">テキストスライド</span>
<span class="btn-text-hover">ホバー効果</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-slide-btn {
position: relative;
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text-original,
.btn-text-hover {
display: block;
transition: transform 0.3s ease;
}
.btn-text-hover {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 100%);
color: #ffd700;
}
.text-slide-btn:hover .btn-text-original {
transform: translateY(-100%);
}
.text-slide-btn:hover .btn-text-hover {
transform: translate(-50%, -50%);
}
.text-slide-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
④ カスタマイズ例
/* スライド方向の変更 */
.btn-text-hover {
transform: translate(100%, -50%);
}
.text-slide-btn:hover .btn-text-hover {
transform: translate(-50%, -50%);
}
/* スライド速度の変更 */
.btn-text-original,
.btn-text-hover {
transition: transform 0.5s ease;
}
/* ホバーテキスト色の変更 */
.btn-text-hover {
color: #ff6b6b;
}
テキストフェード
① デモ
See the Pen テキストフェード by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストがフェードする効果
- スムーズな変化
- 視覚的インパクト中
- エレガントな印象
② HTML
<div class="button-container">
<button class="text-fade-btn">
<span class="btn-text-original">テキストフェード</span>
<span class="btn-text-hover">ホバー効果</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-fade-btn {
position: relative;
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
min-height: 50px;
width: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.btn-text-original,
.btn-text-hover {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: opacity 0.3s ease;
white-space: nowrap;
}
.btn-text-hover {
opacity: 0;
color: #ffd700;
}
.text-fade-btn:hover .btn-text-original {
opacity: 0;
}
.text-fade-btn:hover .btn-text-hover {
opacity: 1;
}
.text-fade-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
④ カスタマイズ例
/* フェード速度の変更 */
.btn-text-original,
.btn-text-hover {
transition: opacity 0.5s ease;
}
/* ホバーテキスト色の変更 */
.btn-text-hover {
color: #ff6b6b;
}
/* フェード方向の変更 */
.btn-text-hover {
transform: translate(-50%, -50%) scale(0.8);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.text-fade-btn:hover .btn-text-hover {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
テキストスケール
① デモ
See the Pen テキストスケール by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストがスケールする効果
- 動的な表現
- 視覚的インパクト中
- 注目を集める効果
② HTML
<div class="button-container">
<button class="text-scale-btn">
<span class="btn-text">テキストスケール</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-scale-btn {
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text {
display: block;
transition: transform 0.3s ease;
}
.text-scale-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.text-scale-btn:hover .btn-text {
transform: scale(1.2);
color: #ffd700;
}
④ カスタマイズ例
/* スケール倍率の変更 */
.text-scale-btn:hover .btn-text {
transform: scale(1.5);
}
/* スケール速度の変更 */
.btn-text {
transition: transform 0.5s ease;
}
/* テキスト色の変更 */
.text-scale-btn:hover .btn-text {
color: #ff6b6b;
}
テキスト回転
① デモ
See the Pen テキスト回転 by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストが回転する効果
- 動的な表現
- 視覚的インパクト大
- インタラクティブな印象
② HTML
<div class="button-container">
<button class="text-rotate-btn">
<span class="btn-text">テキスト回転</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-rotate-btn {
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text {
display: block;
transition: transform 0.3s ease;
}
.text-rotate-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.text-rotate-btn:hover .btn-text {
transform: rotate(360deg);
color: #ffd700;
}
④ カスタマイズ例
/* 回転角度の変更 */
.text-rotate-btn:hover .btn-text {
transform: rotate(180deg);
}
/* 回転速度の変更 */
.btn-text {
transition: transform 0.6s ease;
}
/* 回転方向の変更 */
.text-rotate-btn:hover .btn-text {
transform: rotate(-360deg);
}
テキストグロー
① デモ
See the Pen Untitled by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストが光る効果
- 美しい表現
- 視覚的インパクト大
- 注目を集める効果
② HTML
<div class="button-container">
<button class="text-glow-btn">
<span class="btn-text">テキストグロー</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-glow-btn {
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text {
display: block;
transition: all 0.3s ease;
}
.text-glow-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.text-glow-btn:hover .btn-text {
color: #ffd700;
text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700;
}
④ カスタマイズ例
/* グロー色の変更 */
.text-glow-btn:hover .btn-text {
color: #ff6b6b;
text-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b, 0 0 30px #ff6b6b;
}
/* グロー強度の変更 */
.text-glow-btn:hover .btn-text {
text-shadow: 0 0 15px #ffd700, 0 0 25px #ffd700, 0 0 35px #ffd700;
}
/* グロー速度の変更 */
.btn-text {
transition: all 0.5s ease;
}
テキストストローク
① デモ
See the Pen テキストストローク by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストのストロークが変化する効果
- 洗練された表現
- 視覚的インパクト中
- モダンな印象
② HTML
<div class="button-container">
<button class="text-stroke-btn">
<span class="btn-text">テキストストローク</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-stroke-btn {
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text {
display: block;
transition: all 0.3s ease;
-webkit-text-stroke: 0px transparent;
}
.text-stroke-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.text-stroke-btn:hover .btn-text {
color: transparent;
-webkit-text-stroke: 1px #ffd700;
}
④ カスタマイズ例
/* ストローク色の変更 */
.text-stroke-btn:hover .btn-text {
-webkit-text-stroke: 1px #ff6b6b;
}
/* ストローク幅の変更 */
.text-stroke-btn:hover .btn-text {
-webkit-text-stroke: 2px #ffd700;
}
/* ストローク速度の変更 */
.btn-text {
transition: all 0.5s ease;
}
テキスト変形
① デモ
See the Pen テキスト変形 by ケケンタ (@lgshifbg-the-looper) on CodePen.
- テキストが変形する効果
- 動的な表現
- 視覚的インパクト大
- 革新的な印象
② HTML
<div class="button-container">
<button class="text-morph-btn">
<span class="btn-text">テキスト変形</span>
</button>
</div>
③ CSS
.button-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
background: #f8f9fa;
padding: 2rem;
}
.text-morph-btn {
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-text {
display: block;
transition: all 0.3s ease;
}
.text-morph-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.text-morph-btn:hover .btn-text {
transform: skewX(-10deg) scale(1.1);
color: #ffd700;
letter-spacing: 2px;
}
④ カスタマイズ例
/* 変形角度の変更 */
.text-morph-btn:hover .btn-text {
transform: skewX(-20deg) scale(1.1);
}
/* 変形速度の変更 */
.btn-text {
transition: all 0.5s ease;
}
/* 文字間隔の変更 */
.text-morph-btn:hover .btn-text {
letter-spacing: 4px;
}
/* 変形色の変更 */
.text-morph-btn:hover .btn-text {
color: #ff6b6b;
}
まとめ
今回ご紹介したテキスト系ボタンホバーアニメーションは、Webサイトのユーザーエクスペリエンスを向上させる重要な要素です。
実装のコツ
- 適切なアニメーション時間(300ms〜500ms)
- スムーズなイージング関数の使用
- モバイルデバイスでの動作確認
- アクセシビリティの配慮
- パフォーマンスの最適化
避けるべきポイント
- 過度に複雑なアニメーション
- 長すぎるアニメーション時間
- 読みにくい色の組み合わせ
- パフォーマンスを考慮しない実装
- 過度な使用
おすすめの組み合わせ
- CTAボタン: テキストスライド、テキストグロー
- ナビゲーションボタン: テキストフェード、テキストスケール
- アクションボタン: テキスト回転、テキスト変形



特にCTAボタンやナビゲーションボタンでは、テキスト系ボタンホバーアニメーションがユーザーエクスペリエンスを大きく左右します。この記事のコードをご活用いただき、より魅力的なWebサイトの制作に繋がれば何よりです。
あわせて読みたい
もっと効率的にWeb制作を学びたい方へ
Web制作の学習は楽しいものですが、一人で進めていると「これで合っているのかな?」と不安になることもありますよね。
僕も独学でWeb制作を学んできましたが、今思うと「もっと早く知りたかった」と思うことがたくさんあります。
特に以下のような方は、一度プログラミングスクールの利用を検討してみることをおすすめします。
- 学習の方向性に迷いがある方
- 効率的にスキルを身につけたい方
- 転職や副業でWeb制作を活用したい方
- 挫折経験がある方
忍者CODEなら、業界最安値で24時間サポート付きの学習環境が整っています。


コメント