CSS实现按钮点击波纹扩散效果 CSS HTML 2019-02-23 按钮点击效果 HTML1<div class="button">点击效果</div> CSS1234567891011121314151617181920212223242526272829303132.button{ position: relative; width: 150px; height: 50px; line-height: 50px; font-size: 16px; text-align: center; border: 1px solid #ccc; background: #eee; overflow: hidden; user-select: none; cursor: pointer;}.button:after{ position: absolute; content: ''; top: 0; left: 0; width: 100%; height: 100%; background: #333; opacity: 0; transition: all .5s;}.button:active:after{ top: 50%; left: 50%; width: 0; height: 0; opacity: .3; transition: all 0s;} 最后更新: 2024年04月12日 02:35 原始链接: https://xiaguochang.github.io/posts/19701066/