svg+css实现新年快乐文字描边动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现新年快乐文字描边动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html { background: #ccedf9; } #main-wrapper { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) skewY(-30deg); overflow: visible; } @keyframes strokeShift { 0%, 100% { stroke-dasharray: 1000; stroke-dashoffset: 1000; stroke-width: 6px; } 50% { stroke-dashoffset: 0; stroke-width: 9px; } } svg * { stroke-linecap: bevel; stroke-linejoin: round; } path { fill: #fff; stroke: #00a7e1; stroke-width: 1; } .st1, .st0 { fill: none; stroke: #085156; stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 10; animation: strokeShift 7.5s infinite; } </style> </head> <body> <div id="main-wrapper"> <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In --> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="458" height="254px" viewBox="-50 0 600 254" style="enable-background:new 0 0 457.7 253.9;" preserveAspectRatio="xMidYmid meet" xml:space="preserve"> <defs> <filter xmlns="http://www.w3.org/2000/svg" id="dropshadow" height="130%"> <feGaussianBlur in="SourceAlpha" stdDeviation="0"/> <feOffset dx="-5" dy="-3" result="offsetblur"/> <feComponentTransfer> <feFuncA type="linear" slope="0.15"/> </feComponentTransfer> <feMerge> <feMergeNode/> <feMergeNode in="SourceGraphic"/> </feMerge> </filter> </defs> <g filter="url(#dropshadow)"> <path class="st0" d="M34.9,164.2V67.7c0-19.5-31.4-19.8-31.4,0.5c0,15,18,14.1,18,3.3"/> <path class="st0" d="M34.9,74.8c0-27.6,42-29.3,42-1.6s0,68.7,0,86.6c0,17.5,17.1,22.3,17.1,22.3"/> </g> <g filter="url(#dropshadow)"> <path class="st0" d="M247.5,146.3c0,27.6-42,29.3-42,1.6s0-43.5,0-61.4c0-21-9.4-31-29.4-31"/> </g> <g filter="url(#dropshadow)"> <path class="st0" d="M152.7,95.6c0,11,0,43.3,0,60.3s-22.5,16-22.5-1V95.6"/> <path class="st0" d="M152.6,154.9c0,17,22.5,18,22.5,1s0-39,0-50c0-15,12-18,12-18"/> </g> <g filter="url(#dropshadow)"> <path class="st0" d="M104.1,96.8h-0.4c-6.2,0-11.3,5.1-11.3,11.3v15.7c0,6.2,5.1,11.3,11.3,11.3h0.4c6.2,0,11.3-5.1,11.3-11.3v-15.7 C115.4,101.8,110.4,96.8,104.1,96.8z"/> <path class="st0" d="M288.7,108.1c0-6.2-5.1-11.3-11.3-11.3h-0.4c-6.2,0-11.3,5.1-11.3,11.3v48.4c0,6.2,5.1,11.3,11.3,11.3h0.4 c6.2,0,11.3-5.1,11.3-11.3c0-4.1,0-9.5,0-9.5"/> <path class="st0" d="M277.4,96.8h-0.4c-6.2,0-11.3,5.1-11.3,11.3v15.7c0,6.2,5.1,11.3,11.3,11.3h0.4c6.2,0,11.3-5.1,11.3-11.3v-15.7 C288.7,101.8,283.6,96.8,277.4,96.8z"/> <path class="st1" d="M115.4,108.1c0-6.2-5.1-11.3-11.3-11.3h-0.4c-6.2,0-11.3,5.1-11.3,11.3l0,44.1c0,21.1,37.4,24,37.4-10.7"/> <path class="st1" d="M325.7,158.2c0,12.8,18,13.5,18,0c0-15,0-67.4,0-67.4s9.7,20.6,21.6,8.7c0,0,0,57.7,0,68.7 c0,18.7,15.9,35.3,37.5,35.3c21.7,0,21-30.3,0-30.3c-26.7,0-40.6,46.3-76.9,46.3c-26,0-22-29.7-0.3-29.7c30.3,0,32.3,30.7,77.3,30.7 s49.7-66.7,0-66.7c-13,0-25.3,11.3-25.3,11.3" /> </g> <g filter="url(#dropshadow)"> <path d="M29.4,39.9v-0.6c2.........完整代码请登录后点击上方下载按钮下载查看
网友评论0