+ 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
7 ответов
+ 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"/>
+ 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 ...
+ 1
Tom Joney (TheCoder) That is not HTML. It is SVG an XML-based vector graphics format.
+ 1
BroFar , thanks a lot, good solution
+ 1
0
Ore Adeleye , thanks, it helped me very much)
0
Tom Joney (TheCoder) , everything worked out without CSS