gpt4 book ai didi

css - gulp compile SCSS/SASS 中断有效的颜色值

转载 作者:太空宇宙 更新时间:2023-11-04 01:20:55 29 4
gpt4 key购买 nike

我有这个代码。适用于 chrome 开发工具

p {
color: #00000070;
padding: 0px 10px;
position: relative;
z-index: 98;
}

当我尝试编译它时出现此错误

[19:36:38] Using gulpfile ~/job/fello/gulpfile.js
[19:36:38] Starting 'sass'...
Error in plugin 'sass'
Message:
wp-content/themes/fellose/styles/layouts/_mypages.scss
Error: Invalid CSS after " color:": expected expression (e.g. 1px, bold), was "#00000070;"
on line 462 of wp-content/themes/fellose/styles/layouts/_mypages.scss
>> color: #00000070;
------------^

如果我输入任何其他值,如 #000000black,它会起作用。我认为这与我为不透明度添加最后几位有关。

最佳答案

颜色代码只有 3 (#000) 或 6 (#000000) 位数值。所以你必须只添加 3 或 6 位数字,如果你想添加不透明度然后在 rgba(0,0,0,0.6);

中定义颜色

前三个数字用于颜色,最后一个浮点值用于不透明度。

关于css - gulp compile SCSS/SASS 中断有效的颜色值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49117363/

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