透明的CSS背景颜色 [英] Transparent CSS background color

查看:381
本文介绍了透明的CSS背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用不透明度使列表菜单的背景消失,而又不影响字体. CSS3可以吗?

解决方案

现在您可以在CSS属性中使用 rgba ,如下所示:

 .class {
    background: rgba(0,0,0,0.5);
}
 

0.5是透明度,请根据您的设计更改值.

实时演示 http://jsfiddle.net/EeAaB/

更多信息 http://css-tricks.com/rgba-browser-support/

I want to make the list menu's background disappear by using opacity, without affecting the font. Is it possible with CSS3?

解决方案

now you can use rgba in CSS properties like this:

.class {
    background: rgba(0,0,0,0.5);
}

0.5 is the transparency, change the values according to your design.

Live demo http://jsfiddle.net/EeAaB/

more info http://css-tricks.com/rgba-browser-support/

这篇关于透明的CSS背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆