How to use a Fallbacks in css

Tell us what’s happening:
how can I create a fallback color in the .red-box class

Your code so far


<style>
  :root {
    --red-color: red;
  }
  .red-box {
    background: var(--red-color);
    height: 200px;
    width:200px;
  }
</style>
<div class="red-box"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 OPR/63.0.3368.71.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/improve-compatibility-with-browser-fallbacks

Add

background: red;
background: var(--red-color);

to your CSS. The reason is IE doesn’t support CSS variables so when it hits the var(--red-color) it won’t know what that is and fallback to the background element before it.