4

Hello,

I'm able to make texts fade in and out sequentially, like the following :

F
Fi
Fir
Firs
First
 irst
  rst
   st
    t
S
Se
Sec
Seco
Secon
Second
 econd
  cond
   ond
    nd
     d
T
Th
Thi
Thir
Third

Demo : https://jsfiddle.net/KaKi87/t3jm8yhx/2/

But I'd like to to make these fade in and out simultaneously, like the following :

F
Fi
Fir
Firs
First
S rst
Se st
Sec t
Seco
Secon
Second
T cond
Th ond
Thi nd
Thir d
Third

How to do that ?

Thanks !

you are viewing a single comment's thread
view the rest of the comments
[-] hassanmckusick@lemmy.discothe.quest 1 points 10 months ago

Your awaits are random and not synced to your animations. On line 5 you start a 500ms animation but you tell the await to pause for 2000ms. Try 500ms or even 300ms with the current easing.

[-] KaKi87@sh.itjust.works 1 points 10 months ago* (last edited 10 months ago)

I set such delays so that I have time to watch things happening in devtools, that's all.

However, reducing delays still doesn't allow the next text to appear simultaneously with the previous text disappearing.

The solution is figuring out how to overlay the texts without requiring a background color.

this post was submitted on 23 Oct 2023
4 points (83.3% liked)

Web Development

3421 readers
49 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS