Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
How do we make any image keep moving
How doe we make any image keep moving up and down infinite using css.
3 Antworten
+ 8
img {
-webkit-animation: mover 2s infinite alternate;
animation: mover 2s infinite alternate;
}
@-webkit-keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}
@keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}
Hope it will helps you
+ 1
It is called CSS animation. The example will help you:
https://code.sololearn.com/WkPgVzVkSZIe/?ref=app
+ 1
https://code.sololearn.com/WSIDv0Nv40wX
Transitions & Transforms
https://www.sololearn.com/learning/1023
I feel confused about the parameter combinations of css animation, so I used to refer to some online css animation generators.