0

I have been able to create a ripple effect around a down arrow with one ring.

The animation: https://rimildeyjsr.github.io/St.Anthony-Website/

I want to extend the animation to include three rings with similar animations. What would be the simplest way to achieve the animation?

.down-arrow {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  top: 81.5%;
  z-index: 5;
  border-radius: 50%;
  height: 80px;
  width: 80px;
}
.ring {
  border: 2.5px solid white;
  -webkit-border-radius: 50%;
  height: 80px;
  width: 80px;
  position: absolute;
  left: 0;
  right: 0;
  top: 81%;
  z-index: 5;
  margin: 0 auto;
  -webkit-animation: pulsate 2s ease-out;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-delay: 2s;
  opacity: 0.0;
}
@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(0, 0);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1.2, 1.2);
    opacity: 0;
  }
}
<img src="images/down-arrow.png" alt="down arrow for navigation" class="img-responsive down-arrow-page-one animated
                slideInDown">
<div class="ring"></div>
kukkuz
  • 41,512
  • 6
  • 59
  • 95
Rimil Dey
  • 827
  • 2
  • 13
  • 33
  • I dont know if this is correct way or not. But what you can do is. Create 2 more ring div with same CSS and delay or increase their webkit-animation time. Make sure you use position values to make them sit one above the other. – Veer Nov 17 '16 at 09:40
  • Check this out: http://stackoverflow.com/questions/36707159/how-to-create-a-pulsing-glow-ring-animation-in-css they are using CSS after and before property to create that effect. – Veer Nov 17 '16 at 09:43

2 Answers2

1

Here is a variant of solution:

body {
    background-color: #668822;
}
.down-arrow {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  top: 81.5%;
  z-index: 5;
  border-radius: 50%;
  height: 80px;
  width: 80px;
}
.ring {
  border: 2.5px solid white;
  -webkit-border-radius: 50%;
  height: 80px;
  width: 80px;
  position: absolute;
  left: 0;
  right: 0;
  top: 200px;
  z-index: 5;
  margin: 0 auto;
  -webkit-animation: pulsate 2s ease-out;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-delay: 2s;
  opacity: 0.0;
}
.ring2 {
  -webkit-animation-delay: 1.7s;
}
.ring3 {
  -webkit-animation-delay: 1.4s;
}
@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(0, 0);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1.2, 1.2);
    opacity: 0;
  }
}
<img src="images/down-arrow.png" alt="down arrow for navigation" class="img-responsive down-arrow-page-one animated
                slideInDown">
<div class="ring"></div><div class="ring ring2"></div><div class="ring ring3"></div>

Further you may play with delays of circles appearing.

Banzay
  • 9,310
  • 2
  • 27
  • 46
1

This is the best I can do:

JS Fiddle

div.ring:before,
div.ring:after, span  {
  border: 1px solid white;
  position: absolute;
  content: '';
  height: 80px;
  width: 80px;
  left: 0;
  right: 0;
  top: 25%;
  z-index: 5;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 1px white;
  animation: pulsate 3s ease-out infinite;
}
div.ring:after {
  -webkit-animation-delay: 2s;
}
span{
  -webkit-animation-delay: 1s;
  }
@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(0, 0);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1.2, 1.2);
    opacity: 0;
  }
} 

body {background: black;}
<div class="ring">
  <span></span>
</div>
Veer
  • 166
  • 1
  • 1
  • 16