+ 10
I used a <div> move in CSS
In the file (HTML Road), I used a movement in CSS and no longer on JS because it does not work anymore. Comment on "I know" or "I do not know" please. View this code : https://code.sololearn.com/Wr64zsTa44yz/?ref=app
5 Answers
+ 6
Thank you for helping me. :)
+ 4
add "-WebKit-animation" instead of "animation" in all like this or tell me i will add
.car-1 {
margin-left : 5px;
text-align : center;
padding-top : 5px;
height : 25px;
width : 100px;
background-color : red;
border-radius : 2px;
box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.36);
-webkit-animation-name : speed-car-red;
-webkit-animation-duration : 5s;
-webkit-animation-timing-function: linear;
-webkit-animation-direction : normal;
position: relative;
transition : 1s;
}
@-webkit-keyframes speed-car-red {
0% {
margin-left : 5%;
} 10% {
margin-left : 15%;
} 20% {
margin-left : 25%;
} 30% {
margin-left : 35%;
} 40% {
margin-left : 45%;
} 50% {
margin-left : 55%;
} 60% {
margin-left : 61%;
} 80% {
margin-left : 65%;
} 100% {
margin-left : 71%;
}
}
+ 3
yeah it is good
+ 1
JavaScript should work more than css
+ 1
remove all " animation' with -WebKit-animation