How do i move the whole bullet using animation | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

How do i move the whole bullet using animation

https://code.sololearn.com/WS3Rs7g8vaIF/?ref=app

9th Sep 2018, 3:33 PM
Code master
13 Respuestas
+ 6
Code master Joaquin Nievas You forgot or missed to put curly braces {} after 0% and 100%. That's why it won't move. Do it like this: @keyframes bullet { 0% {transform: translate(0px , 0px)} 100% {transform:translate(300px , 0px)} } But this will automatically animate. If you want to animate it after clicking, use JavaScript. PS: Mark this as best answer if you think this helps you.
9th Sep 2018, 11:08 PM
Email Not Activated
+ 2
transform: translate (90px , 0px)
9th Sep 2018, 3:45 PM
Joaquin Nievas
Joaquin Nievas - avatar
+ 2
if you want to move them to the end of the page you could use: @keyframes 0% transform : translate (0px , 0px) 100%transform:translate(100% , 0%)
9th Sep 2018, 3:49 PM
Joaquin Nievas
Joaquin Nievas - avatar
+ 2
i want to move it from the start position to 300px to the right
9th Sep 2018, 3:52 PM
Code master
+ 2
if i click on the bullet it should move 300px to the bullet and the bullet is made of two parts
9th Sep 2018, 3:57 PM
Code master
+ 2
Code master Your animations still don't work because the word "transform:" is outside the curly braces. You should put it inside this "{".
10th Sep 2018, 4:54 AM
Email Not Activated
+ 1
i dont want to rotate the bullet i want to move it horizontally
9th Sep 2018, 3:40 PM
Code master
+ 1
hey joaquin im sorry the question is wrong i want to transition it
9th Sep 2018, 3:50 PM
Code master
+ 1
you can do it with JavaScript . the function is called onclick event . search onclick event in a web page called w3schools
9th Sep 2018, 5:18 PM
Joaquin Nievas
Joaquin Nievas - avatar
0
transition it?
9th Sep 2018, 3:51 PM
Joaquin Nievas
Joaquin Nievas - avatar
0
where do you want to move it?
9th Sep 2018, 3:51 PM
Joaquin Nievas
Joaquin Nievas - avatar
0
@keyframes bullet 0% transform: translate(0px , 0px) 100%transform:translate(300px , 0px)
9th Sep 2018, 3:54 PM
Joaquin Nievas
Joaquin Nievas - avatar
0
can I somehow merge my bullet1 and bullet2 div
10th Sep 2018, 3:49 AM
Code master