<!doctype html> <html> <head> <meta charset="utf-8"> <title>按钮</title> <style> .btn { margin: 25px auto; position: relative; font-size: 25px; color: #fff; padding: 20px; width: 200px; overflow: hidden; text-align: center; cursor: pointer; text-transform: uppercase; background-color: #2ecc71; } .btn:after { content: " "; background: red; position: absolute; width: 200px; height: 200px; left: 0; right: 0; top: 0; bottom: 0; opacity: 0; margin: auto; border-radius: 50%; transform: scale(1); transition: all 0.75s ease-in-out; } .btn:active:after { transform: scale(0); opacity: 1; transition: 0s; } </style> </head> <body> <div class="btn">点击</div> </body> </html>
按钮点击效果(波纹)
猜你喜欢
转载自blog.csdn.net/angularwq/article/details/78459122
今日推荐
周排行