为什么期望背景颜色加粗1像素? [英] Why expected 1px bold for background color?
问题描述
这是我的无礼:
table#orders {
background-color:#ff0000;
}
但是,当我实际运行此命令时,出现错误提示在#ff0000之后的无效CSS:期望的表达式(例如1px,粗体)为;
我不知道为什么它期望背景色像1px这样的东西。谁能帮我解决这个问题?
可能您的sass文件扩展名为* .sass,更改为* .scss
*。sass具有不同的语法,这就是为什么会引发这些疯狂错误的原因。
*。scss支持普通的CSS合成音符,就像您的 >
如果您有兴趣了解这些语法,我们对此有一个很好的疑问:
This is my sass:
table#orders {
background-color:#ff0000;
}
However, when I actually run this, I got an error saying Invalid CSS after "#ff0000": expected expression (e.g. 1px, bold), was ";"
I don't know why it is expecting something like 1px for background-color. Can anyone help me figure it out?
probably your sass file extension is *.sass, change to *.scss
*.sass has different syntax, that's why it throws these "crazy" errors.
*.scss support normal css synthax, like yours
if you got interested to learn about these syntax, we have a good question about this:
What's the difference between SCSS and Sass?
这篇关于为什么期望背景颜色加粗1像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!