我已经能够在带有一个环的向下箭头周围创建一个涟漪效果。
动画: https://rimildeyjsr.github.io/St.Anthony-Website/
我想扩展动画以包含三个具有类似动画的铃声。 实现动画的最简单方法是什么?
.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>
&#13;
答案 0 :(得分:1)
以下是解决方案的变体:
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;
}
}
&#13;
<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>
&#13;
此外,您可能会出现延迟出现的圆圈。
答案 1 :(得分:1)
这是我能做的最好的事情:
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>