Floating Particles
Soft glowing particles that drift upward with gentle sway and fade, perfect for ambient hero backgrounds.
Floating Particles
by FreeCsStyles Dev's
AnimationsAmbient
🌐HTML/CSS
#particles#floating#ambient#drift
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/floating-particles.
<iframe src="/embed/floating-particles" sandbox="allow-scripts" loading="lazy" title="Floating Particles" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Floating Particles. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<div class="particles-bg">
<span class="particle p1"></span>
<span class="particle p2"></span>
<span class="particle p3"></span>
<span class="particle p4"></span>
<span class="particle p5"></span>
<span class="particle p6"></span>
<div class="particles-label">Floating Particles</div>
</div>CSS
.particles-bg {
position: relative;
width: 100%;
height: 220px;
border-radius: 16px;
overflow: hidden;
background: #0a0b1e;
}
.particle {
position: absolute;
bottom: -10px;
border-radius: 50%;
animation: particle-float 5s ease-in infinite;
}
.p1 { left: 5%; width: 6px; height: 6px; background: hsla(250, 80%, 65%, 0.8); box-shadow: 0 0 10px hsla(250, 80%, 65%, 0.5); animation-duration: 4s; }
.p2 { left: 20%; width: 4px; height: 4px; background: hsla(190, 80%, 65%, 0.8); box-shadow: 0 0 8px hsla(190, 80%, 65%, 0.5); animation-duration: 5s; animation-delay: 0.5s; }
.p3 { left: 35%; width: 8px; height: 8px; background: hsla(330, 80%, 65%, 0.8); box-shadow: 0 0 12px hsla(330, 80%, 65%, 0.5); animation-duration: 6s; animation-delay: 1s; }
.p4 { left: 50%; width: 5px; height: 5px; background: hsla(280, 80%, 65%, 0.8); box-shadow: 0 0 10px hsla(280, 80%, 65%, 0.5); animation-duration: 4.5s; animation-delay: 1.5s; }
.p5 { left: 70%; width: 7px; height: 7px; background: hsla(40, 80%, 65%, 0.8); box-shadow: 0 0 10px hsla(40, 80%, 65%, 0.5); animation-duration: 5.5s; animation-delay: 0.8s; }
.p6 { left: 85%; width: 4px; height: 4px; background: hsla(160, 80%, 65%, 0.8); box-shadow: 0 0 8px hsla(160, 80%, 65%, 0.5); animation-duration: 4s; animation-delay: 2s; }
.particles-label {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: 800;
color: rgba(255, 255, 255, 0.9);
}
@keyframes particle-float {
0% { transform: translateY(0) translateX(0); opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { transform: translateY(-240px) translateX(20px); opacity: 0; }
}Where Floating Particles fits
- Hero Backgrounds
- Ambient Effects
- Decorative Motion
Topics
- #particles
- #floating
- #ambient
- #drift