본문 바로가기
svg

svg textPath,stroke-dasharray,stroke-dashoffset

by peach1227 2023. 9. 16.
<svg viewBox="0 0 20 20">
<style>
path {

animation:anim 5s ease-in-out infinite;}
@keyframes anim {
0% {stroke-dashoffset:47;}
100% {stroke-dashoffset:0;}

}
</style>


<defs>
<radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%" >

      <stop offset="0%" stop-color="gold" stop-opacity="1"/>
      <stop offset="100%" stop-color="green" stop-opacity="1"/>
</radialGradient>
</defs>
<path id="path1" d="M5,10 a 5,5 0 0 1 15,0a 5,5 0 0 1 -15,0" 
style="fill:url(#grad1);stroke:red;stroke-dasharray:47 47;stroke-dashoffset:47;"/>

<text style="font-size:2px;"><textPath href="#path1">We are the world.first-degree. second-degree....</textPath></text>

</svg>
We are the world.first-degree. second-degree....
반응형

'svg' 카테고리의 다른 글

boxy-svg.com example :filter and so on.  (1) 2023.09.24
svg text to path:using Boxy SVG Editor  (0) 2023.09.17
svg radialGradient example  (0) 2023.09.16
svg marker : arrow  (0) 2023.09.15
svg path : leaves  (0) 2023.09.14