svg+css实现一个格鲁特花盆中招手动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现一个格鲁特花盆中招手动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<style>
svg {
width: 350px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 0 auto;
}
#groot {
opacity: 0;
animation: 1.5s animation-groot-show forwards;
}
@keyframes animation-groot-show {
0% {
opacity: 0;
transform: translate3d(0, -100px, 0);
}
100% {
opacity: 1;
transform: translate3d(0, 0px, 0);
}
}
#eyeLeft {
animation: 1.5s linear animation-eye infinite alternate;
}
#eyeRight {
animation: 1.5s linear animation-eye infinite alternate;
}
@keyframes animation-eye {
0% {
transform: translate3d(0, -2px, 0);
}
100% {
transform: translate3d(0, 1px, 0);
}
}
#mouth {
animation: 1.5s animation-mouth linear infinite alternate;
}
@keyframes animation-mouth {
0% {
transform: translate3d(0, 2px, 0);
}
100% {
transform: translate3d(0, 5px, 0);
}
}
#head {
animation: 1.5s linear infinite alternate animation-head;
}
@keyframes animation-head {
0% {
transform: translate3d(0, -1px, 0);
}
100% {
transform: translate3d(0, 1px, 0);
}
}
#armLeft {
transform-origin: 45% 50%;
animation: 1.3s linear infinite alternate animation-armLeft;
}
@keyframes animation-armLeft {
0% {
transform: rotate(-10deg);
}
100% {
transform: rotate(5deg);
}
}
#armRight {
transform-origin: 48% 48%;
animation: 1.3s linear infinite alternate animation-armRight;
}
@keyframes animation-armRight {
0% {
transform: rotate(-8deg);
}
100% {
transform: rotate(3deg);
}
}
#leaf4 {
animation: 1.5s linear infinite alternate animation-left-hand;
}
@keyframes animation-left-hand {
0% {
transform: translatex(0) translatey(0);
}
100% {
transform: translatex(-1px) translatey(2px);
}
}
#leaf1 {
animation: 1.5s infinite alternate animation-left;
}
#leaf2 {
animation: 1.5s infinite alternate animation-left;
animation-delay: 1s;
}
#leaf3 {
animation: 1.5s infinite alternate animation-left;
animation-delay: .5s;
}
@keyframes animation-left {
0% {
transform: translatey(0);
}
100% {
transform: translatey(3px);
}
}
#leaf5 {
animation: 1.5s linear infinite alternate animation-leaf-body-right;
}
@keyframes animation-leaf-body-right {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-3px, 0, 0);
}
}
#leaf6 {
animation: 1.5s linear infinite alternate animation-leaf-body-left;
}
#leaf7 {
animation: 1.5s linear infinite alternate animation-leaf-body-left;
animation-delay: 1s;
}
@keyframes animation-leaf-body-left {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(4px, 0, 0);
}
}
</style>
</head>
<body>
<?xml version="1.0" encoding="utf-8" ?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;" xml:space="preserve">
<style type="text/css">
.st0{fill:#39B54A;stroke:#42210B;stroke-width:2;stroke-miterlimit:10;}
.st1{fill:#39B54A;stroke:#603813;stroke-width:2;stroke-miterlimit:10;}
.st2{fill:#BB7F52;stroke:#42210B;stroke-width:2;stroke-miterlimit:10;}
.st3{fill:#BB7F52;}
.st4{fill:#FFFFFF;stroke:#603813;stroke-width:2;stroke-miterlimit:10;}
.st5{fill:#42210B;stroke:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0