<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<title>Document</title>
<style>
.ripple {
position: relative;
overflow: hidden;
}
.ripple:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
background-image: radial-gradient(circle, #666 10%, transparent 10.01%);
background-repeat: no-repeat;
background-position: 50%;
transform: scale(10, 10);
opacity: 0;
transition: transform .3s, opacity .5s;
}
.ripple:active:after {
transform: scale(0, 0);
opacity: .3;
transition: 0s;
}
</style>
</head>

<body>
<div class="container text-center">
<button class="btn btn-default ripple btn-lg">Button</button>
<button class="btn btn-default ripple btn-lg">Button with very long content</button>
</div>

</body>

</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-11-25
  • 2022-01-22
  • 2021-12-12
  • 2022-01-22
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-09-14
  • 2022-12-23
  • 2021-12-07
  • 2022-01-03
  • 2022-01-22
相关资源
相似解决方案