修改LESS变量的alpha透明度 [英] Modify alpha opacity of LESS variable
本文介绍了修改LESS变量的alpha透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用LESS,我知道我可以改变颜色变量的饱和度或色调。这看起来像这样:
Using LESS, I know that I can change the saturation or tint of a color variable. That looks like this:
background: lighten(@blue, 20%);
我想改变我的颜色的alpha不透明度。最好是这样:
I want to change the alpha opacity of my color, though. Preferably like this:
background: alpha(@blue, 20%);
在LESS中有一个简单的方法吗?
Is there a simple way to do this in LESS?
推荐答案
网站文档提供了答案:
background: fade(@blue, 20%);
函数名称 fade
不是 alpha
。
这篇关于修改LESS变量的alpha透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文