CSS3实现水波扩散动画

CSS3实现水波扩散动画

HTML结构:

<div class="water">
	<div class="point point1"></div>
	<div class="point point2"></div>
	<div class="point point3"></div>
	<div class="point point4"></div>
</div>

css样式:

.water{
	width: 50px;
	height: 50px;
	position: relative;
}
.water .point{
	position: absolute;
	border-radius: 50%;
	animation: border 2s linear infinite;
}
.water .point2{
	-webkit-animation-delay: 0.5s;
}
.water .point3{
	-webkit-animation-delay: 1s;
}
.water .point4{
	-webkit-animation-delay: 1.5s;
}
@keyframes border{
	from {
		width: 0;
		height: 0;
		top: 50%;
		left: 50%;
		background-color: rgba(235,51,36,1);
	}
	to {
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		background-color: rgba(235,51,36,0);
	}
}