0
Can some one tell me how to make the second div slower than the first?
12 Respostas
+ 6
Maintain two sperate variables for each animation.
https://code.sololearn.com/WwXokwQgx8AI/?ref=app
+ 4
đ« Rick Grimes too many flaws đŹđ«
I thought that the variable 'pos' is the rate of change and not the change itself đ
+ 4
Dani Mecoss why all?
I didn't help you
Instead, I got confused đđđ
+ 4
Dani Mecoss đđđ
You're welcome then đ
+ 3
https://code.sololearn.com/WylRmxi4JfWc/?ref=app
It looks the same speed even when you change the time interval because the 'pos' variable increases at the same rate as the more speedier one.
+ 3
Just put a smaller value in line 26
Like: pos+=0.5
+ 3
đ« Rick Grimes Ohh đ€
I didn't know he used a single variable for 2 different animations đł
+ 3
đ« Rick Grimes what about changing the time interval đ
In line just put a value > 10
+ 2
Namit, try it as well.
If you run the second animation after 500ms and first is running at 10ms then value of pos will still be changing because of animation1.
+ 1
Namit Jain try it.
He uses one variable for both animation, so value will be same no matter how less you add.
+ 1
thx all
+ 1
namit cuz u take the time at least to confuse me