是否有一个选项,包括不透明的颜色,你定义为你的主色/次色在 sass 变量?按照淡化($color,amount)函数的方式?
You can use rgba, i.e.
rgba
$primary: rgba(20,20,20, .5);
It works for hex values as well
$primary: rgba(#4B00B5, .3);
You can also set the opacity of colors based on a variable value. For example:
$primary-color: #a61723; .... color: rgba($primary-color, .5);
Demo