1
我试图将一个div与部分透明背景(意思是图像的区域是空白的 - 不是X%不透明度)放在另一个div上。将背景图像设置为具有部分透明度的图像
#about {
background-image:url('http://i.imgur.com/B922OoM.png');
background-position: center;
background-repeat: none;
background-size: cover;
background-color: transparent;
z-index: 2;
height: 450px;
width: 100%;
}
我不能让div不填充图像后面的白色。
的jsfiddle: - (我敢肯定,图像被正确导出 - 如果改变background-color:transparent
到background-color:blue
,你就会明白我的意思)http://jsfiddle.net/4HAxu/相关DIV是#about
为haxxxton说你已经添加的图像以这样的方式photoshoped的顶部是透明的,因此它显示你的身体 – Vicky
感谢您的帮助背景......! –
对@haxxton进行小更新如果添加background-color,则回答:rgba(0,0,0,0.6);在#about(免费更改rbba颜色值),那么它会更接近杰森正在寻找我猜。 http://jsfiddle.net/4HAxu/6/ – cjmling