0

I got a template in SVG data. Here I have a text I would like to pulsate.

Html:

<tspan class="text animated pulse" x="14.325" y="39.18">50</tspan></text>

it´s doesn't work.

Here is a link to codepen

S.I.
  • 3,250
  • 12
  • 48
  • 77
B.B
  • 25
  • 7

3 Answers3

0

Maybe try it like this ?

tspan.text.animated.pulse {
  animation: pulse-text infinite;
  animation-duration: 1s;
}

@keyframes pulse-text {
  0% {font-size: 1em;}
  50% {font-size: 1.1em;}
  100% {font-size: 1em;}
}
Mayari
  • 510
  • 1
  • 3
  • 16
0

hy, thanks for anwser.. no this not option ;(( i muss speek this css class text animated pulse

<g transform="matrix(1,0,0,1,165.514,113.873)" class="no-kerning">
<text stroke-width="0" stroke="#5F5E5E" stroke-linejoin="round" fill="#5F5E5E" font-family="CurrencyRegular" font-size="40"><tspan class="text animated pulse" x="14.325" y="39.18">50</tspan></text>
</g>
B.B
  • 25
  • 7
0

For tspan element transform property will not work. You can try animating font-size. Check the updated code.

https://codepen.io/anon/pen/WKVOzB

code changes:-

tspan.text.animated.pulse {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
   0%,100% {font-size:40px;}
   50% {font-size:50px;}
}
Anji
  • 689
  • 1
  • 5
  • 24