css借助伪元素实现水波效果
作者:互联网
不BB,上代码,拉走看
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<style>
.btn {
margin: 100px auto;
width: 100px;
height: 50px;
position: relative;
overflow: hidden;
background: #e3e3e3;
border-radius: 5px;
cursor: pointer;
}
.btn:after {
content: '';
display: block;
width: 200px;
height: 200px;
border-radius: 50%;
position: absolute;
left: -50px;
top: -75px;
opacity: 0;
transition: all .6s;
background: linear-gradient(to right bottom,#46a4f5,#65cdf4);
}
.btn:active:after{
width: 0;
left: 50px;
top: -50px;
transition-duration: 0s;
opacity: 1;
}
</style>
</head>
<body>
<div class="btn"></div>
</body>
</html>
标签:50px,100px,height,width,radius,借助,btn,水波,css 来源: https://blog.csdn.net/amdd9582/article/details/95506197