gsap实现按钮提交捐钱动画效果

代码语言:html

所属分类:表单美化

代码描述:gsap实现按钮提交捐钱动画效果

代码标签: 提交 捐钱 动画 效果

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


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

<style>
button {
  border: 0;
  padding: 0;
  color: #000;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: transparent;
  box-shadow: 10px 10px rgba(0, 0, 0, 0.1);
  transition: 0.1s box-shadow ease-in;
}
button svg {
  background: #3f3e3c;
  width: 50px;
  height: 40px;
  padding: 10px;
  transition: 0.4s;
}
button div.wrapper {
  padding: 0 25px 0 10px;
  height: 60px;
  overflow: hidden;
  background: #f5f5f5;
}
button div.wrapper .slider {
  transform: translate3d(0, 0, 0);
}
button div.wrapper .slider span {
  color: #010101;
  display: block;
  line-height: 60px;
}
.dropped {
  box-shadow: 6px 6px rgba(0, 0, 0, 0.1);
}
a {
  font-weight: bold;
  color: #386981;
  position: absolute;
  font-size: 12px;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}
html {
  width: 100%;
  height: 100%;
}
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: #ffc5c4;
  overflow: hidden;
  font-family: sans-serif;
}
</style>

</head>
<body translate="no">
<button id="donation-btn">
<svg viewBox="0 0 512 512">
<g id="hand">
<g fill="#5adecb">
<path d="M47.1,302h.........完整代码请登录后点击上方下载按钮下载查看

网友评论0