svg女孩荡秋千动画效果

代码语言:html

所属分类:动画

代码描述:svg女孩荡秋千动画效果

代码标签: 动画 效果

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


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

<style>
body{
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #fff;
}
svg{
    width: 500px ;
    align-self: center;
    justify-self: center;
    margin-left: 30%;
    margin-top: 7%;
}

svg #mujer{
    animation-duration:1.2s;
    animation-name: meser;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

@keyframes meser{
    from{
        transform: translateX(0) translateY(0);
        
    }
    to{
        transform: translateX(12px) translateY(6px);
    }
}

svg #columpio{
    animation-duration: 1.2s;
    animation-name: cuerdas;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}
@keyframes cuerdas{
    from{
        transform: translateX(0px);
    }
    to{
        transform: translateX(2px);
    }
}

svg #hojas-arbol{
    animation-duration: 3s;
    animation-name: hojas;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}
@keyframes hojas{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}

.st0{fill:#3F3D56;}
	.st1{opacity:0.1;enable-background:new    ;}
	.st2{fill:#FFB9B9;}
	.st3{fill:#D0CDE1;}
	.st4{fill:#2F2E41;}
	.st5{fill:#0C963A;}
	.st6{fill:#F2F2F2;}
</style>

</head>
<body translate="no">

<svg version="1.1" id="aad34d2c-b6e7-481f-91dd-037f78086296" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 855.3 676" style="enable-background:new 0 0 855.3 676;" xml:space="preserve">
<g id="arbol">
<path class="st0" d="M393.6,23.2c0.5,1.2,0.9,2.4,1.2,3.7C394.2,25,393.7,23.7,393.6,23.2z" />
<path class="st0" d="M411.3,84.4c0,0,0,1.4-1.5,6.4L411.3,84.4z" />
<path class="st0" d="M593.9,292.7c-39.3,20.5-90.8,38.2-106.2,43.3c11.8-3.1,46-7.2,98.9,25.9c66.6,41.5,137.8,13.8,137.8,13.8
		S708.6,406.1,675,408c-33.6,2-121.3-53.4-151-37.6c-29.7,15.8-43.5-4-55.4,35.6c-11.9,39.5-33.6,147.6-8.6,208.3l25,60.6H342.8
		c0,0,51.4-137.1,23.1-221.5c-15.9-47.3-38.1-81.5-46.5-98.9c-4.2-8.7-4.8-13.2,0.6-13c3.1,0.1,8.1,1.8,15.6,5
		c0,0-34.........完整代码请登录后点击上方下载按钮下载查看

网友评论0