喜欢收藏按钮点击动画特效

代码语言:html

所属分类:表单美化

代码描述:喜欢收藏按钮点击动画特效

代码标签: 点击 动画 特效

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
  background: #fafafa;
}
body > * + * {
  margin-right: 24px;
}
:root {
  --transition: 0.3;
  --heart-fill: #e63b19;
}
.heart {
  height: 100%;
  width: 100%;
  position: absolute;
}
.heart--stroke {
  stroke: var(--heart-stroke);
  stroke-width: 2.5px;
  fill: none;
}
.heart--fill {
  stroke: none;
  fill: var(--heart-fill);
  -webkit-transform: scale(var(--scale, 0));
          transform: scale(var(--scale, 0));
}
.heart__particle {
  height: 16px;
  width: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: hsl(var(--h), 80%, 70%);
  -webkit-transform: translate(-50%, -50%) rotate(calc(var(--r, 0) * 1deg)) translate(0, calc(var(--radius, 0) * 1px)) scale(0);
          transform: translate(-50%, -50%) rotate(calc(var(--r, 0) * 1deg)) translate(0, calc(var(--radius, 0) * 1px)) scale(0);
}
.button {
  height: 40px;
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  position: relative;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justif.........完整代码请登录后点击上方下载按钮下载查看

网友评论0