Skip to content

Instantly share code, notes, and snippets.

@AdonaiAraya
Created April 28, 2016 10:49
Show Gist options
  • Save AdonaiAraya/03a6a18c47bc4f2d9acf780e0c3f6b99 to your computer and use it in GitHub Desktop.
Save AdonaiAraya/03a6a18c47bc4f2d9acf780e0c3f6b99 to your computer and use it in GitHub Desktop.
Echo / waves animation (CSS only). Demo: https://jsfiddle.net/AdonaiAraya/wcs8sdpt/
@-webkit-keyframes echo {
0% {
padding: 0;
margin: 0;
opacity: 1;
}
100% {
padding: 50px;
margin: -50px;
opacity: 0;
}
}
@keyframes echo {
0% {
padding: 0;
margin: 0;
opacity: 1;
}
100% {
padding: 50px;
margin: -50px;
opacity: 0;
}
}
.waves {
position: absolute;
left: 50%;
top: 50%;
}
.wave {
position: absolute;
border: 2px solid #363636;
border-radius: 50%;
display: inline-block;
padding: 0;
animation-name: echo;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
-webkit-animation-name: echo;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: ease-out;
}
.wave:nth-of-type(2) {
animation-delay: 0.4s;
-webkit-animation-delay: 0.4s;
}
.wave:nth-of-type(3) {
animation-delay: 0.8s;
-webkit-animation-delay: 0.8s;
}
<div class="waves">
<span class="wave"></span>
<span class="wave"></span>
<span class="wave"></span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment