- 1
How to to type code with @keyframes to draw square trajectory on four steps animation.
i try type animation, but... try this code... html: <div></div> css: div { width:100px; height:100px; background-color:red; border-radius:5px; animation-name: mm; -webkit-animation-name: mm; -webkit-animation-delay:2s; -webkit-animation-duration:4s; } } @-webkit-keyframes mm { 25% {bottom:200px;} 50% {right:200px;} 75% {top:200px;} 100%{left:200px;} }
22 ответов
+ 2
animation: my 4s ease-out 5; // thus would repeat 5 times
+ 1
is that what you want?
https://code.sololearn.com/Wy058cINPYDH/?ref=app
+ 1
its working
+ 1
thank god 😂😂
+ 1
using top left properties the div don't make traces they just pop and disappear.... whereas about curve moves you need to check both properties while movement. like if you have to move right.. then you need to check the top distance remains constant.. similarly while moving upward the left distance must remain constant all the way
+ 1
prefixer added..
https://code.sololearn.com/Ws0gN55cDgkA/?ref=app
+ 1
Because it needs 2 animations, mx (move vertically) and my (move horizontally) with different animation delay ease-in and ease-out in order to create trajectory curvature movement.
animation-fillmode forwards is to set final destination at last movement position.
+ 1
sorry, but, how to add repeat count to animaion?
+ 1
content:" "
it is usually used with pseudo before and after classes..
+ 1
ок.
0
add position:relative to ur CSS
and remove extra closing bracket'}'
0
do u have any referemce what you want to achieve?
0
recheck
0
Sami, code work!!! yes! that's what I need! thanks!
0
But, why if use top, left, right, bottom tags square start curve move?
0
why need tags:"content"" and animaion fill mode"?
- 1
help! how to type normal trajectory?
- 1
after, i add position:relative; but this not work. trajectory is curve...
- 1
No. This square must go to right on 200px, bottom, left, and top.
After i see output ans say:"WTFFFF?";