svg+css实现女孩风中长发飘飘动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+css实现女孩风中长发飘飘动画效果代码

代码标签: 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" viewBox="-10 -10 220 100" preserveAspectRatio="none">
    <path fill="none" stroke="#0A6463" stroke-miterlimit="10" d="M126.18,5.53C67.68-4.05,10.55-3.91,1.37,28.27
        s30.53,47.04,41.45,42.04s21.94-15.4,16.15-28.88s-31.06-7-31.51,0S23.82,54.15,35,54.55"/>
</symbol>
<symbol id="wind-three" viewBox="-10 -10 220 100" preserveAspectRatio="none">
    <path fill="none" stroke="#0A6463" stroke-miterlimit="10" d="M166.93,65.99c-16.84-8.37-57.49,2.93-73.86,6.55
        S11.32,99.15,0.95,41.63C-2.49,22.5,3.78,10.82,13.74,4.87c20-11.92,54.9-0.71,56.08,19.88c1.77,30.86-29.6,38.59-42.23,13.86
        c-8.94-17.5,21.22-15.44,15.86-4.22"/>
</symbol>

<symbol id="hair-bottom" viewBox="40 320 500 400">
    <path fill="#FFFFFF" d="M470.25,367.38c37.15,8.98,41.59,17.87,47.17,36.74C523,423,533.68,479.73,378.34,520.12s-280.07-13.8-312.46-72.96S46.96,346.05,46.96,346.05s5,73.89,67.55,95.75C209,474.81,332.67,334.12,470.25,367.38z"/>
    <path fill="none" d="M462.41,372.75c39.75,8.75,50.35,24.11,41.07,56.59s-127.7,77.97-174.21,82.32s-103.4,26.04-202.46-12.43"/>
    <path fill="none" d="M475.65,381.69c12.82,4.52,23.19,13.66,23.21,25.85c0.02,17.46-10.46,26.92-36.45,41.21C407,479.22,310.11,512.77,229,510.46S91.1,477.34,91.1,477.34"/>
    <path fill="none" d="M475.5,385.78c13.42,11.31,14.75,12.73,16.25,18.35c1.5,5.62,4.44,9.88-7.78,18.88c-12.22,9-142.01,59.25-201.86,65.5s-160.71-1.29-190.22-32.3s-39.49-38.81-45.98-85.13c-1.16-8.32,0.42-22.56,0.42-22.56"/>
    <path fill="none" d="M457.56,378.11C383,385,225.5,460.82,167.59,460.73c-57.91-0.1-88.33-27.57-99.19-44.47s-19.47-28.15-21.43-70.2"/>
    <path fill="none" d="M459.98,391.54c-72.98,13.13-188.56,84.44-242.75,84.02c-54.2-0.43-80.09,4.09-137.66-31.56"/>
</symbol>

<symbol id="hair-middle" viewBox="40 320 500 400">
    <path fill="#FFFFFF" d="M484.53,402.8c-1.77,19.51-82.62,62.35-104.5,68.09c-21.........完整代码请登录后点击上方下载按钮下载查看

网友评论0