why “transition: background-color 15s, color 15s;” doesn’t work infinitely without…
Jump to turn (6)
- User
why “transition: background-color 15s, color 15s;” doesn’t work infinitely without @keyframes??? but if you want to make some jiggling on hover effect by transition and without any @keyframes???
- Assistant
The "transition: background-color 15s, color 15s;" property allows the transition of the background color and text color to occur over a duration of 15 seconds. However, it does not specify the number of times the transition should occur. Therefore, without the use of @keyframes, the transition will only occur once when triggered.
To make a jiggling on hover effect using transition without @keyframes, you can use the transform property and specify a rotation value with a transition duration. For example:
code.box { transition: transform 0.3s ease; } .box:hover { transform: rotate(5deg); }This will apply a slight rotation to the box element on hover and animate the rotation using a transition.