Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 我如何在freecodecamp.org上解决这个问题css相关_Html_Css_Css Variables - Fatal编程技术网

Html 我如何在freecodecamp.org上解决这个问题css相关

Html 我如何在freecodecamp.org上解决这个问题css相关,html,css,css-variables,Html,Css,Css Variables,.red box规则应包括一个后备策略,在现有的背景声明之前,将背景设置为红色 以下是预生成的代码: :根目录{ --红色:红色; } .红盒子{ 背景:var(--红色); 高度:200px; 宽度:200px; } 我相信他们想要的是你设置背景:红色紧靠背景之前:var(--红色)

.red box
规则应包括一个后备策略,在现有的
背景
声明之前,将
背景
设置为
红色

以下是预生成的代码:

:根目录{
--红色:红色;
}
.红盒子{
背景:var(--红色);
高度:200px;
宽度:200px;
}

我相信他们想要的是你设置
背景:红色紧靠
背景之前:var(--红色)背景:红色将被使用

:根目录{
--红色:红色;
}
.红盒子{
背景:红色;
背景:var(--红色);
高度:200px;
宽度:200px;
}

把背景放出来

root {
  --red-color: red;
}

.red-box {
  background: red;
  background: var(--red-color);
  height: 200px;
  width: 200px;
}

^^说明:这样,如果css变量失败,它将作为无效语法输出,并使用前面的语法。