<分区>
<分区>
Possible Duplicate:
Translucent background from opaque image
我想使用 rgba,但我没有坚实的背景,因为我使用的是图像。是否可以将图像不透明度设置为部分微弱,然后在内部包含一个 100% 不透明度的 div 而没有任何继承。
#container2 {
position: absolute;
margin-top: 0px;
height: 600px;
margin-top: 50px;
margin-left: 0px;
margin-right: 50px;
width: 1000px;
background-image:url(../images/container2_yellow_nailed.png);
}
最佳答案
目前CSS不支持控制背景图片的不透明度。
您可以通过使用具有相同尺寸、指定 opacity
并将定位在您的元素下方的额外元素来实现类似的效果。
关于html - 使用 rgba 作为背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14164777/