JSFiddle - React, Tailwind, and code Playground
by Alicia Sykes
HTML
<div class="wave-container">
<div class="wave wave1"></div>
<div class="wave wave2"></div>
<div class="wave wave3"></div>
<div class="wave wave4"></div>
</div>
CSS
.wave-container .wave{
position:absolute;
bottom:0;
left:0;
width:100%;
height:100px;
background:url('https://svgshare.com/i/Wzr.svg');
background-size:990px 100px;
background-repeat: repeat-x;
}
.wave-container .wave.wave1{
animation:animate 30s linear infinite;
z-index:1000;
opacity:1;
animation-delay:0s;
bottom: 0;
}
.wave-container .wave.wave2{
animation:animate2 15s linear infinite;
z-index:999;
opacity:0.5;
animation-delay:-5s;
bottom: 10px;
}
.wave-container .wave.wave3{
animation:animate 30s linear infinite;
z-index:998;
opacity:0.2;
animation-delay:-2s;
bottom: 15px;
}
.wave-container .wave.wave4{
animation:animate2 5s linear infinite;
z-index:997;
opacity:0.7;
animation-delay:-5s;
bottom: 20px;
}
@keyframes animate{
0%{
background-position-x: 0;
}
100%{
background-position-x: 990px;
}
}
@keyframes animate2{
0%{
background-position-x: 0;
}
100%{
background-position-x: -990px;
}
}