+ 2

How to change the color?

Hi,friends! Tell me please, how I can make the sun blink with different shades of yellow, orange and red, I work only in html so far, I don’t know CSS yet. This is my first serious animated work, if you want you can support me with like! Thank you all for your attention and color recommendation. https://code.sololearn.com/WTCH2Gz9BTxQ/?ref=app

29th May 2020, 10:50 PM
Blokhin Roman
Blokhin Roman - avatar
9 Respuestas
+ 4
Tom Joney (TheCoder) Yeah. Somehow Blokhin Roman I don't think it is possible to smoothly transition between colors without JavaScript but to animate an attribute the syntax is something like this. <animate attributeName="fill" from="yellow" to="red" dur="1s" fill="freeze" repeatCount="indefinite"/>
30th May 2020, 1:41 AM
Ore
Ore - avatar
+ 3
Blokhin Roman here is a code similar to what Ore Adeleye has explained using SVG value instead of the from to method https://code.sololearn.com/WpqaoyTAb74Q/?ref=app btw Ore the transition is not as spikie as the from to method ...
30th May 2020, 1:51 AM
BroFar
BroFar - avatar
+ 1
Tom Joney (TheCoder) That is not HTML. It is SVG an XML-based vector graphics format.
30th May 2020, 1:30 AM
Ore
Ore - avatar
+ 1
BroFar , thanks a lot, good solution
30th May 2020, 5:34 AM
Blokhin Roman
Blokhin Roman - avatar
+ 1
Ore Adeleye, BroFar, Tom Joney (TheCoder) , I finalized and made more interesting)) Thank you
30th May 2020, 7:55 AM
Blokhin Roman
Blokhin Roman - avatar
0
Ore Adeleye , thanks, it helped me very much)
30th May 2020, 5:32 AM
Blokhin Roman
Blokhin Roman - avatar
0
Tom Joney (TheCoder) , everything worked out without CSS
30th May 2020, 5:36 AM
Blokhin Roman
Blokhin Roman - avatar