Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <title>Example</title> <style> .particle-bg { background: #1a1a1a; width: 100%; height: 200px; position: relative; overflow: hidden; } .particle { fill: rgba(255, 255, 255, 0.3); animation: drift 15s linear infinite; } .p1 { animation-duration: 12s; animation-delay: 0s; } .p2 { animation-duration: 18s; animation-delay: -5s; } .p3 { animation-duration: 14s; animation-delay: -2s; } .p4 { animation-duration: 20s; animation-delay: -10s; } .p5 { animation-duration: 16s; animation-delay: -7s; } @keyframes drift { from { transform: translateY(0) translateX(0); opacity: 0; } 20% { opacity: 0.5; } 80% { opacity: 0.5; } to { transform: translateY(-100px) translateX(20px); opacity: 0; } } </style> <div class="particle-bg" role="img" aria-label="Animated drifting particles"> <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> <circle cx="20" cy="110" r="1" class="particle p1" /> <circle cx="40" cy="120" r="1.5" class="particle p2" /> <circle cx="60" cy="115" r="0.8" class="particle p3" /> <circle cx="80" cy="130" r="1.2" class="particle p4" /> <circle cx="10" cy="125" r="0.9" class="particle p5" /> <circle cx="35" cy="140" r="1.1" class="particle p1" /> <circle cx="55" cy="135" r="1.4" class="particle p2" /> <circle cx="75" cy="145" r="0.7" class="particle p3" /> </svg> </div>