:root imported CSS 在 safari 和 IE 11 中不起作用
:root imported CSS not working in safari and IE 11
:root
选择器在某些浏览器中不工作。
代码:
:root {
--blue: #4d6fd3;
--yellow: #d8c812;
}
h1{
color: var(--blue);
}
h2{
color: var(--yellow);
}
<h1>This is a heading with blue color</h1>
<h2>This is a heading with yellow color</h2>
这些导入的CSS在Safari 5.1.7和IE11中没有应用。
这个css3选择器在所有edge浏览器中都可以正常工作,所以有一些小问题,请看我的图片,希望对您有所帮助。
:root
选择器在某些浏览器中不工作。
代码:
:root {
--blue: #4d6fd3;
--yellow: #d8c812;
}
h1{
color: var(--blue);
}
h2{
color: var(--yellow);
}
<h1>This is a heading with blue color</h1>
<h2>This is a heading with yellow color</h2>
这些导入的CSS在Safari 5.1.7和IE11中没有应用。
这个css3选择器在所有edge浏览器中都可以正常工作,所以有一些小问题,请看我的图片,希望对您有所帮助。