css+js实现彩色泡泡粒子爆炸按钮点击动画效果代码
代码语言:html
所属分类:粒子
代码描述:css+js实现彩色泡泡粒子爆炸按钮点击动画效果代码
代码标签: css js 彩色 泡泡 粒子 爆炸 按钮 点击 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Baloo+Chettan+2&display=swap"); * { padding: 0; margin: 0; } body { height: 100vh; display: flex; align-items: center; justify-content: center; background: #e3e3e3; } #button { position: relative; border: 2px solid #e0e0e0; padding: 20px 30px; font-size: 25px; border-radius: 10px; outline: none; cursor: pointer; font-family: "Baloo Chettan 2", cursive; min-width: 251px; background: transparent; color: #c7c7c7; border-radius: 6px; background: #e3e3e3; box-shadow: 26px 26px 53px #c1c1c1, -26px -26px 53px #ffffff; } #button:active { transform: scale(0.98); } particle { border-radius: 50%; left: 0; pointer-events: none; position: fixed; top: 0; opacity: 0; background: #20e3a2; } particle:before { content: ""; position: absolute; top: 1%; left: 5%; width: 90%; height: 90%; border-radius: 50%; background: radial-gradient(circle at 50% 0px, #ffffff, rgba(255, 255, 255, 0) 58%); -webkit-filter: blur(5px); z-index: 2; } .hide { animation: hide 0.2s linear; animation-fill-mode: forwards; transition-timing-function: cubic-bezier(0.64, 0.57, 0.67, 1.53); } @keyframes hide { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } </style> </head> <body> <!-- partial:index.partial.html --> <button id="button">Send us message<.........完整代码请登录后点击上方下载按钮下载查看
网友评论0