跑步 ”
×
改变方向
在 Codepen 上打开
更改主题,深色/浅色
<!DOCTYPE html> <html> <head><meta http-equiv="content-security-policy" content="script-src 'none'"> <style> .button { position: relative; background-color: #4CAF50; border: none; font-size: 28px; color: #FFF; padding: 20px; width: 200px; text-align: center; transition-duration: 0.4s; text-decoration: none; overflow: hidden; cursor: pointer; } .button:after { content: ""; background: #f1f1f1; display: block; position: absolute; padding-top: 300%; padding-left: 350%; margin-left: -20px !important; margin-top: -120%; opacity: 0; transition: all 0.8s } .button:active:after { padding: 0; margin: 0; opacity: 1; transition: 0s } </style> </head> <body> <h2>Анимированная кнопка - "эффект ряби"</h2> <button class="button">Кликни меня</button> </body> </html>