オーロラ背景
複数のアニメーションする楕円形ブロブとフィルターでオーロラのように幻想的に流れる背景エフェクト。ピュアCSSで実装。
HTMLCSS
プレビュー
ピュアCSSだけで実現したオーロラ背景。ブロブが滑らかに動き続け、幻想的な雰囲気を演出します。
夜空に踊る
ピュアCSSで演出するオーロラ背景。訪問者を幻想的な表現で引き込みます。
ユースケースと特徴
-
ヒーローセクションの背景: ランディングページのヒーローエリアやスプラッシュページの背景に最適。
-
ピュアCSS実装:
backdrop-filter不要。filter: blurをブロブの親要素に適用することでシンプルに実現。 -
複数のブロブに異なる遅延と所要時間: それぞれ設定することで動きの単調さを防ぐ。
-
コンテンツの重ね合わせ:
z-index: 1のコンテンツをブロブの上に重ねられる。
デザインとUXのポイント
-
filter: blur(60px)を親要素に: 個別のブロブにではなく親要素にかけることでパフォーマンスを向上。 -
8〜13秒の波長の違い: 同じリズムにならないことで自然な躍動感を生む。
-
radial-gradientで中心から透明に: なめらかな色の滲みがオーロラ式の柔らかい光を半透明に見せる。
カスタマイズ方法
バリエーション例: サンセット
.aurora-blob-1 { background: radial-gradient(ellipse, #f97316 0%, transparent 70%); }
.aurora-blob-2 { background: radial-gradient(ellipse, #ef4444 0%, transparent 70%); }
.aurora-blob-3 { background: radial-gradient(ellipse, #f59e0b 0%, transparent 70%); }
ブレンドの強さを変える
.aurora-blobs { opacity: 0.8; } /* 強め */
.aurora-blobs { opacity: 0.4; } /* 弱め */
実装コード
<div class="aurora-wrap">
<div class="aurora-blobs">
<div class="aurora-blob aurora-blob-1"></div>
<div class="aurora-blob aurora-blob-2"></div>
<div class="aurora-blob aurora-blob-3"></div>
<div class="aurora-blob aurora-blob-4"></div>
</div>
<div class="aurora-content">
<h2>夜空に踊る</h2>
<p>ピュアCSSで演出するオーロラ背景。</p>
</div>
</div>
<style>
.aurora-wrap { position: relative; width: 100%; min-height: 400px; background: #030014; overflow: hidden; }
.aurora-blobs { position: absolute; inset: 0; filter: blur(60px); opacity: 0.65; }
.aurora-blob { position: absolute; border-radius: 50%; animation: aurora-move 10s ease-in-out infinite; }
.aurora-blob-1 { width: 400px; height: 300px; background: radial-gradient(ellipse, #6366f1 0%, transparent 70%); top: -100px; left: -100px; }
.aurora-blob-2 { width: 350px; height: 350px; background: radial-gradient(ellipse, #8b5cf6 0%, transparent 70%); top: -50px; right: -80px; animation-delay: -3s; animation-duration: 13s; }
.aurora-blob-3 { width: 300px; height: 250px; background: radial-gradient(ellipse, #06b6d4 0%, transparent 70%); bottom: -80px; left: 30%; animation-delay: -6s; animation-duration: 8s; }
.aurora-blob-4 { width: 250px; height: 300px; background: radial-gradient(ellipse, #ec4899 0%, transparent 70%); bottom: -60px; right: 10%; animation-delay: -2s; animation-duration: 11s; }
@keyframes aurora-move {
0%, 100% { transform: translate(0,0) scale(1); }
33% { transform: translate(30px,-20px) scale(1.05); }
66% { transform: translate(-20px,25px) scale(0.95); }
}
.aurora-content { position: relative; z-index: 1; text-align: center; padding: 3rem; }
</style> ブラウザ対応状況
| ブラウザ | 対応状況 |
|--------|--------|
| Chrome 43+ | ✅ 完全対応 |
| Firefox 16+ | ✅ 完全対応 |
| Safari 9+ | ✅ 完全対応 |
| Edge 79+ | ✅ 完全対応 |
モバイルではブルーフィルターがパフォーマンスに影響を及ぼす場合があるため、
animation: noneでアニメーションを停止するか、min-heightの調整を検討してください。