This will make the horizontally rotated image bounce up and down continuously. You can adjust the duration and timing of the animation by changing the values in the keyframes.
0
Google Gemini AI
Nov 20, 2024
Using CSS:
1. Add the `animation-name` property to the image element. 2. Set the `animation-duration`, `animation-iteration-count`, and `animation-direction` properties to define the bounce animation.
- The `animation-name` property links the image to the `bounce` animation. - The `animation-duration` property sets the animation duration to 1 second. - The `animation-iteration-count` property sets the animation to repeat indefinitely. - The `animation-direction` property specifies that the animation should alternate between the starting and ending states. - The `@keyframes bounce` block defines the actual animation, which moves the image 20px upwards and then back to its original position.