- 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;} }

25th Aug 2017, 9:42 AM
Vlad L
Vlad L - avatar
22 Antworten
+ 2
animation: my 4s ease-out 5; // thus would repeat 5 times
25th Aug 2017, 11:28 AM
Calviղ
Calviղ - avatar
25th Aug 2017, 10:57 AM
Calviղ
Calviղ - avatar
25th Aug 2017, 11:00 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
its working
25th Aug 2017, 11:07 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
thank god 😂😂
25th Aug 2017, 11:08 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 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
25th Aug 2017, 11:12 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
25th Aug 2017, 11:19 AM
Calviղ
Calviղ - avatar
+ 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.
25th Aug 2017, 11:24 AM
Calviղ
Calviղ - avatar
+ 1
sorry, but, how to add repeat count to animaion?
25th Aug 2017, 11:27 AM
Vlad L
Vlad L - avatar
+ 1
content:" " it is usually used with pseudo before and after classes..
25th Aug 2017, 11:38 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
ок.
25th Aug 2017, 1:14 PM
Vlad L
Vlad L - avatar
0
add position:relative to ur CSS and remove extra closing bracket'}'
25th Aug 2017, 9:54 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
do u have any referemce what you want to achieve?
25th Aug 2017, 10:10 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
recheck
25th Aug 2017, 11:07 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
Sami, code work!!! yes! that's what I need! thanks!
25th Aug 2017, 11:08 AM
Vlad L
Vlad L - avatar
0
But, why if use top, left, right, bottom tags square start curve move?
25th Aug 2017, 11:09 AM
Vlad L
Vlad L - avatar
0
why need tags:"content"" and animaion fill mode"?
25th Aug 2017, 11:21 AM
Vlad L
Vlad L - avatar
- 1
help! how to type normal trajectory?
25th Aug 2017, 9:42 AM
Vlad L
Vlad L - avatar
- 1
after, i add position:relative; but this not work. trajectory is curve...
25th Aug 2017, 10:09 AM
Vlad L
Vlad L - avatar
- 1
No. This square must go to right on 200px, bottom, left, and top. After i see output ans say:"WTFFFF?";
25th Aug 2017, 10:18 AM
Vlad L
Vlad L - avatar