V
V
Vitaly Gusev2020-03-20 13:50:27
gulp.js
Vitaly Gusev, 2020-03-20 13:50:27

Is it possible to change the background color several times with the help of transition and transform in some time?

Good day.

There is some div. It is necessary to give it a rotation of 360 degrees, while it must change the background color as follows:
At the beginning of the rotation, for example, it is blue, in the middle (after 180 degrees), it is red and in 360 it is blue again.
Is it possible to do this without using animation, i.e. only through transform and transition?

PS If you still know a way to loop this process without JS and CSS animation, then that's not bad either.
I know that you can set rotate(3600deg), for example, but it will still end.

People! I'm not a magician, I'm just learning.
How to do it with animation - I know. Just thought I'd ask if there is an alternative way.
I'm really learning and I need to submit my work for verification, I did it this way and that way.
With animation, I looped it, and without animation, I did it by hovering over 1 full rotation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
approximate solution, 2020-03-20
@guvijur

Without the use of js (native), jquery or css built-in animation + keyframes is impossible. The maximum that you can do is throw events on hover.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question