+ 3

translateX and translateY

Is it possible to apply a translateX first them translateY? If i try: .blabla { transform: translateX(300px) transform: translateY(300px) } the translateY will run but the translateX wont :( Edit: I want the translateX runs first then Y

3rd May 2020, 12:00 PM
Allan Nguyễn
Allan Nguyễn - avatar
5 Antworten
+ 4
Allan Nguyễn if you want 2 transform run in sequence, you need to put in it @keyframes, use animation selector to run the @keyframes sequence.
3rd May 2020, 12:57 PM
Calviղ
Calviղ - avatar
+ 6
Hey, you can use it like : transform: translate(300px, 300px);
3rd May 2020, 12:03 PM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 3
Allan Nguyễn Remember in css, the come after selector always overwrite the precedent same selector. So never expect 2 same selector would take effect together.
3rd May 2020, 12:55 PM
Calviղ
Calviղ - avatar
+ 2
Animation will help then At 0% translateX At 50% translate Y
3rd May 2020, 12:54 PM
Abhay
Abhay - avatar
+ 1
Arb Rahim Badsa i tried it but it runs both, i want the X runs first then Y... i meant... i want to goes left first then go down...
3rd May 2020, 12:39 PM
Allan Nguyễn
Allan Nguyễn - avatar