是否可以只对背景而不对文本实现不透明度?
.box
{
background-color: #000;
opacity: 0.7;
filter: alpha(opacity=70);
color: #fff;
height: auto;
width: 232px;
margin: 5px 0px 0px 20px;
padding: 1px 0px 1px 15px;
border-radius: 15px;
border: solid 1px #000;
}
最佳答案
给你 - http://jsfiddle.net/4Zbsd/7/
在背景属性上使用 rgba 颜色 - "background: rgba(0, 0, 0, .7);"
.box
{
background: rgba(0, 0, 0, .7);
color: #fff;
height: auto;
width: 232px;
margin: 5px 0px 0px 20px;
padding: 1px 0px 1px 15px;
border-radius: 15px;
border: solid 1px #000;
}
关于jquery - 如何修复背景不透明度 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24516703/