gsap实现按钮点击跳跃动画效果
代码语言:html
所属分类:动画
代码描述:gsap实现按钮点击跳跃动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Inter:400,500,600,700&display=swap'>
<style>
.favorite-button {
--background-default: #313440;
--text-color-default: #FAFBFF;
--star-color-default: #62677C;
--star-face-color-default: #1F2128;
--star-color-active: #F6C206;
--star-face-color-active: #845901;
--star-hole: #16181E;
--star-hole-inner: #20232C;
--button-y: 0px;
--star-y: 0px;
--star-scale: 1;
--star-rotate: 0deg;
--star-hole-scale: 0;
--star-face-scale: 1;
--text-x: 0px;
--text-o: 1;
-webkit-tap-highlight-color: transparent;
-webkit-appearance: none;
outline: none;
border: none;
background: none;
min-width: 125px;
padding: 12px 24px 12px 16px;
margin: 0;
font-family: inherit;
font-size: 14px;
font-weight: 500;
line-height: 19px;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
cursor: pointer;
position: relative;
color: var(--text-color-default);
-webkit-transform: translateY(var(--button-y)) translateZ(0);
transform: translateY(var(--button-y)) translateZ(0);
}
.favorite-button:before {
content: ''.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0