gsap+svg实现点赞喜欢按钮点击动画效果代码

代码语言:html

所属分类:表单美化

代码描述:gsap+svg实现点赞喜欢按钮点击动画效果代码

代码标签: gsap svg 点赞 喜欢 按钮 点击 动画

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&amp;display=swap'>
  
<style>
.high-five {
  --hands-x: 4px;
  --hands-o: 0;
  --success-clip: 0%;
  --success-o: 0;
  --success-text-o: 0;
  font-family: "Poppins", Arial;
  font-size: 16px;
  font-weight: 600;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: #ff7576;
  background-color: #fff;
  border: none;
  outline: none;
  padding: 12px 0;
  width: 124px;
  text-align: center;
  position: relative;
  line-height: 20px;
  box-shadow: 0px 4px 16px rgba(255, 146, 149, 0.1), 0px 1px 2px rgba(255, 146, 149, 0.1);
  border-radius: 7px;
  transform: translateZ(0);
  transition: transform 0.15s, background-color 0.15s;
}
.high-five:active {
  transform: scale(0.98, 0.97) translateZ(0);
}
.high-five .hands {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--hands-o);
  pointer-events: none;
}
.high-five .hands svg {
  display: block;
  width: 32px;
  height: 36px;
  fill: #fff;
  stroke-width: 1.5;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill .........完整代码请登录后点击上方下载按钮下载查看

网友评论0