How to set different color in a select box due to selection with css
I have a select box with 2 options. In the selct area the options are
green for 1
red for 2
I had been able to set green also as the color for the predefined option.
Now I would like to change this due to the incoming selection.
That means, if someone has 1 as predefined selection the color of the appearing conent of the shown select box should be green and if some has 2 as redefined selection the color of the appearing conent of the shown select box should be red.
The whole thing only with css if possible.
Thanks in advance