What is the code to blend colors fo a cool affect? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

What is the code to blend colors fo a cool affect?

10th Aug 2016, 8:50 PM
SPARKY YT
SPARKY YT - avatar
2 ответов
0
You can add a css rule like "transition: background-color 2s;" to enable a smooth transition of background colours. Then you can change the background colour every 2 seconds using javascript element.style DOM manipulation and use setInterval to repeat the changing colours. Check this code, I made it exactly how you want it: http://www.sololearn.com/app/javascript/playground/W1scye9JMt3i/
18th Aug 2016, 6:46 AM
Max
Max - avatar
0
use css animation with gradients
18th Aug 2016, 6:47 AM
shadow1435