我有一个较少的问题:
@frames_color: #faeacd;
@menu_color_hex: #faeacd;
@menu_color_rgba: rgba(250, 234 ,205 , 255);
少:
.topmenu {
a {
background-color: @menu_color_hex;
background-color: @menu_color_rgba;
}
}
结果在CSS:
#user_field .topmenu a {
background-color: #faeacd;
}
和
.topmenu {
a {
background-color: green;
background-color: @menu_color_hex;
background-color: red;
background-color: @menu_color_rgba;
background-color: blue;
}
}
结果是:
#user_field .topmenu a {
background-color: green;
background-color: red;
background-color: #faeacd; /* value of menu_color_hex is used instead of menu_color_rgba? */
background-color: blue;
}
我无能为力。为什么要删除一个背景色属性?它是错误还是预期的行为?
最佳答案
在@menu_color_rgba: rgba(250, 234 ,205 , 255)
中,“ 255”不是有效的Alpha值(it only ranges from 0–1)。
如果不需要Alpha值,则使用rgb
可以提供更多浏览器支持(例如,rgba是not supported in IE8)。
关于css - 当有两个使用变量时,node.js较少删除背景属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30626858/