我正在尋找像靠近這個example
能,可以提高這個例子。
<div class="ripple" style="top:50%;left:50%">
</div>
CSS:
ripple,.ripple:before,.ripple:after {
display:block;
border-radius:2px;
margin:0 auto;
width:2px;
height:2px;
-webkit-animation:rip 2s infinite;
-moz-animation:rip 2s infinite;
}
.ripple {
position:absolute;
z-index:1000;
top:10px;
left:15px;
}
.ripple:before,.ripple:after {
content:'';
position:absolute;
}
.ripple:before {-webkit-animation-delay:.1s;-moz-animation-delay:.2s;top:5px;left:0px;}
.ripple:after {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;top:5px;left:0;}
@-webkit-keyframes rip
{
0% {
box-shadow:0 0 0 0 transparent,
0 0 0 0 transparent,
0 0 0 0 transparent,
0 0 0 0 transparent;
}
5% {
box-shadow:0 0 0 0 transparent,
0 0 0 0 rgba(255,0,0,0.5),
0 0 0 0 transparent,
0 0 0 0 rgba(0,0,0,0.1);
}
100% {
box-shadow:0 0 40px 50px transparent,
0 0 10px 60px transparent,
0 0 30px 70px transparent,
0 0 5px 80px transparent;
}
}
@-moz-keyframes rip
{
0% {
box-shadow:0 0 0 0 transparent,
0 0 0 0 transparent,
0 0 0 0 transparent,
0 0 0 0 transparent;
}
5% {
box-shadow:0 0 0 0 transparent,
0 0 0 0 rgba(255,0,0,0.5),
0 0 0 0 transparent,
0 0 0 0 rgba(0,0,0,0.1);
}
100% {
box-shadow:0 0 10px 75px transparent,
0 0 20px 75px transparent,
0 0 30px 75px transparent,
0 0 40px 75px transparent;
}
}
感謝。