Why isnt my animation working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
31st Jul 2020, 11:53 PM
Raja Velu
Raja Velu - avatar
6 Answers
+ 3
div{ background-color:blue; height:100px; width:100px; position:absolute; animation-name:red; animation-duration:1s; } @keyframes red{ 0% {background-color:blue; top:0px;} 100% {background-color:red; top:300px;} } You wrote animation name wrong ,also you can't use top and left properties without positioning element absolutely ,relatively or fixed
1st Aug 2020, 12:15 AM
Abhay
Abhay - avatar
0
Put animate tag in html code
31st Jul 2020, 11:59 PM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar
1st Aug 2020, 12:00 AM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar
0
I want to do using css not html do tou know how
1st Aug 2020, 12:02 AM
Raja Velu
Raja Velu - avatar
0
The color works but it still does not move down
1st Aug 2020, 12:19 AM
Raja Velu
Raja Velu - avatar
0
Thanks
1st Aug 2020, 12:31 AM
Raja Velu
Raja Velu - avatar