본문 바로가기
svg

svg animate tag ; rectangle to morph

by peach1227 2023. 10. 15.
<style>
html,
body,
svg {
height:100%;
margin:0;
padding:0
}
text.text1,text.text2 {
font: italic 1px sans-serif;
fill:red;
stroke:blue;
stroke-width:.02px;
}
</style>


<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
  <rect width="10" height="10" ry="3">
    <animate
      attributeName="rx"
      values="0;5;0;1"
      dur="3s"
      repeatCount="indefinite" />
  </rect>
  <text class="text1" x="2" y="5">We love you!</text>
  <text class="text2" x="2" y="2">Interpret me!</text>
</svg>
We love you! Interpret me!
반응형

'svg' 카테고리의 다른 글

svg rect linearGradient spreadMethod  (0) 2023.10.17
svg view tag with animation  (0) 2023.10.15
svg view tag ; zoom in /out  (0) 2023.10.14
svg text animation ; spiral  (0) 2023.10.13
svg animateMotion : keyPoints  (0) 2023.10.13