我有一对彼此相邻的,我想与CSS样式。我想申请多种颜色的背景,但我希望下一个是相同的颜色与不透明度减小,所以我想到了这一点:将alpha通道添加到给定的颜色
span.foo{
background-color: rgba(0,0,0,1); /*or whatever*/
color:white;
}
span.foo:last-child{
background-color: rgba(*,*,*,0.5); /*just an example*/
}
所以我想改变的不透明度已经定义了背景,而不会仅仅使用CSS3来影响文本的不透明度。
这可能吗?
嗨,你可以使用过滤器试试这个,检查此链接https://css-tricks.com/almanac/properties/ F /滤波器/ –