gpt4 book ai didi

css - 错误 "Invalid CSS after\"...线性梯度 (\": expected selector, was\"{\"",

转载 作者:行者123 更新时间:2023-11-27 23:09:20 24 4
gpt4 key购买 nike

尝试编译 sass 我得到这个错误:(找不到错误的语法:)

/* {
"status": 1,
"file": "C:/Users/faido/Desktop/Productivity/sass
css/project/sass/main.sass",
"line": 36,
"column": 9,
"message": "Invalid CSS after \"...inear-gradient(\": expected selector,
was \"{\"",
"formatted": "Error: Invalid CSS after \"...inear-gradient(\": expected
selector, was \"{\"\n on line 36 of sass/main.sass\n>>
linear-gradient( {\n\n --------^\n"
}
*/

对于这段代码:

.header 
background-image: linear-gradient(
to right bottom,
rgba( $color-primary-light, 0.8 ),
rgba( $color-primary-dark, 0.8 )
),
url(../img/hero.jpg)

非常感谢任何帮助/见解

最佳答案

Sass 的缩进语法 unfortunately does not support multiline expressions .

要修复它,您必须将所有内容放在一行中:

.header 
background-image: linear-gradient(to right bottom, rgba($color-primary-light, 0.8), rgba($color-primary-dark, 0.8)) url(../img/hero.jpg)

关于css - 错误 "Invalid CSS after\"...线性梯度 (\": expected selector, was\"{\"",,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58613601/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com