Animation of text reveal letter by letter
Hi everyone
I had a text reveal effect on the firdt text "we are laxer"
the problem is the last letter appear before the middle letter
my html code :
my CSS:
my codepen:
https://codepen.io/alpha_66/pen/KKrKbML
cna I have some idea ?
6 Replies
You have got 12 characters but have only customized the animation on 8 of them so the last 3 (plus the fist one) are using the default delay that you have set and are therefore animating in at the same time.
Just to clarify, you are using the child selectors from 2 to 8, these include your “empty” spans which probably don’t really need animating.
You probably meant to animate children 2, 4,5,,6, 8,9,10,11,12
Hi Chris
I change my code now the last letter appear before
It's just a matter of identifiying which children, you are nearly there.
Try this:
alternatively you could give a class name to each of the letters and define the delay by class name rather than nth-child but this should work and requires less html markup
I know we discussed it before but this line:
animation-delay: calc(2.5s + 4.5s + 5s/2 300ms + 1.9s);
is not doing anything as the calculation is invalidChris you are awesome great
pretty sure you need spaces between the operators, so
5s / 2
and there's no operator between 5s / 2 and 300ms