Aperçu

L’arrière-plan Aurora rendu possible avec du CSS pur. La goutte continue de se déplacer en douceur, créant une atmosphère fantastique.

夜空に踊る

ピュアCSSで演出するオーロラ背景。訪問者を幻想的な表現で引き込みます。

Cas d’utilisation et fonctionnalités

Points de conception et d’UX

  1. filter: blur(60px) sur l’élément parent : améliorez les performances en l’appliquant à l’élément parent au lieu des blobs individuels.

  2. Différence de longueur d’onde de 8 à 13 secondes : Créer une sensation naturelle de mouvement en ne suivant pas le même rythme.

  3. radial-gradient pour le rendre transparent à partir du centre : Un saignement de couleur fluide rend la lumière douce du style aurore translucide.

Comment personnaliser

バリエーション例: サンセット


.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; } /* 弱め */

##Code d’implémentation

<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>

État de compatibilité du navigateur

| Navigateur | Statut de compatibilité |

|--------|-------|

| Chrome 43+ | ✅ Entièrement compatible |

| Firefox 16+ | ✅ Entièrement compatible |

| Safari 9+ | ✅ Entièrement compatible |

| Bord 79+ | ✅ Entièrement compatible |

Les filtres bleus peuvent affecter les performances sur mobile, pensez donc à arrêter l’animation avec « animation : none » ou à ajuster « min-height ».