jquery+svg实现爱心点赞动画效果代码
代码语言:html
所属分类:其他
代码描述:jquery+svg实现爱心点赞动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #101010;
}
* {
box-sizing: border-box;
}
.like {
width: 42px;
height: 42px;
border-radius: 999px;
position: relative;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.like svg {
margin: 11px 9px 7px 9px;
transform: translate3d(0, 0, 0);
}
.like svg .heart {
opacity: 1;
transition: all 0.3s ease;
transform-origin: center;
}
.like svg .thread {
stroke-dashoffset: 87;
stroke-dasharray: 87;
transform: scale(0.5);
transform-origin: center;
}
.like.liked svg {
animation: bounce 0.8s ease;
}
.like.liked svg .heart {
opacity: 0;
transform: scale(0.5);
}
.like.liked svg .thread {
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0