0
Both the block and the character are jumping pls help
Try fixing this body { } #game{ width:500px; height:200px; border: 1px solid black; } #character{ width:20px; height:50px; background-color:blue; position:relative; top:150px; animation: jump 500ms infinite; } @keyframes jump{ 0%{top:150px;} 30%{top:100px;} 70%{top:100px;} 100%{top:150px; } #block { Width:20px; Height:20px; Background-corlor:red; }
2 Réponses
+ 4
What if you move the block code above the key frames/character?
If you can share your code here from the code playground, someone can probably find the answer more easily and exactly.
+ 2
In the keyframes, the closing } for 100% is missing
In #block, the attributes are with capital letter.