Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <title>Example</title> <style> .wave-bg { background: linear-gradient(to bottom, #001f3f, #003366); width: 100%; height: 150px; position: relative; overflow: hidden; } .wave-svg { position: absolute; bottom: 0; left: 0; width: 200%; /* Double width for seamless loop */ height: 100%; } .wave-path { animation: moveWave 10s linear infinite; } .wave-path-slow { animation: moveWave 15s linear infinite; } @keyframes moveWave { from { transform: translateX(0); } to { transform: translateX(-50%); } } </style> <div class="wave-bg" role="img" aria-label="Animated ocean waves"> <svg class="wave-svg" viewBox="0 0 200 100" preserveAspectRatio="none"> <!-- Background Wave --> <path class="wave-path-slow" d="M 0 70 Q 25 50 50 70 T 100 70 T 150 70 T 200 70 V 100 H 0 Z" fill="rgba(255,255,255,0.1)" /> <!-- Foreground Wave --> <path class="wave-path" d="M 0 80 Q 25 60 50 80 T 100 80 T 150 80 T 200 80 V 100 H 0 Z" fill="rgba(255,255,255,0.2)" /> </svg> </div>