我遇到了这个问题,我似乎无法覆盖我的 Neat Bourbon 网站中 body 元素的背景颜色。
我在 _layout.scss 文件中这样定义了背景颜色:
body {
background: lighten($brokenwhite, 5);
}
但是当我在 Chrome Devtools 中检查该元素时,body 元素的背景色仍然定义为“白色”。
那么body元素的背景色应该在哪里定义呢?
我的源存储库是 available here .
最佳答案
我猜 $brokenwhite
颜色太亮了,因此 SASS 编译器返回 white
作为结果。
例如:
$brokenwhite: #eee;
body {
background: lighten($brokenwhite, 10);
}
结果是:
body {
background: white;
}
你可以使用 SassMeister 编译上述示例的在线工具。
关于css - 在哪里定义体型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21435349/