Tell us what’s happening:
The code works I am just having a little trouble understanding why it works.
I read the explanation something about how css doesn’t work with older browser like internet explorer. So I need a backup value. How does adding
background: red;
become the default and work with an browser such as css. I thought css doesn’t work with internet explorer. So how does the line above work and become the default with explorer?
Your code so far
<style>
:root {
--red-color: red;
}
.red-box {
background: red;
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; rv:84.0) Gecko/20100101 Firefox/84.0
.
Challenge: Improve Compatibility with Browser Fallbacks
Link to the challenge: