svg+css实现女孩风中长发飘飘动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现女孩风中长发飘飘动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@-webkit-keyframes large-wave {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(-15deg); }
}
@-webkit-keyframes medium-wave {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(-12deg); }
}
@-webkit-keyframes small-wave {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(-10deg); }
}
@keyframes large-wave {
from { transform: rotate(0deg); }
to { transform: rotate(-15deg); }
}
@keyframes medium-wave {
from { transform: rotate(0deg); }
to { transform: rotate(-12deg); }
}
@keyframes small-wave {
from { transform: rotate(0deg); }
to { transform: rotate(-10deg); }
}
.top {
-webkit-animation: large-wave 5s infinite alternate;
animation: large-wave 5s infinite alternate;
}
.middle {
-webkit-animation: medium-wave 5.5s infinite alternate;
animation: medium-wave 5.5s infinite alternate;
}
.bottom {
-webkit-animation: small-wave 6s infinite alternate;
animation: small-wave 6s infinite alternate;
}
@-webkit-keyframes dash {
from { stroke-dashoffset: 1000; }
to { stroke-dashoffset: 0; }
}
@keyframes dash {
from { stroke-dashoffset: 1000; }
to { stroke-dashoffset: 0; }
}
.wind {
stroke-dasharray: 100;
opacity: 0.25;
-webkit-animation: dash 35s linear infinite;
animation: dash 35s linear infinite;
}
html, body {
min-height: 100%;
position: relative;
}
a {
position: absolute;
bottom: 1em;
right: 0;
}
</style>
</head>
<body>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 800 400">
<defs>
<symbol id="wind-one" viewBox="-10 -10 220 100" preserveAspectRatio="none">
<path fill="none" stroke="#0A6463" stroke-miterlimit="10" d="M198.36,63.26c-16.89-13.33-36.29-25.2-85.14-3.35
S5.9,85.45,0.39,38.61S50.27-7.5,60.57,14.63s-1.76,40.88-18.98,34.01S24.87,17.44,42.12,27.6"/>
</symbol>
<symbol id="wind-two&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0