我使用引导与HTML5一起开发一个网站。 我有一个网站标题。 我希望在网站标题中使用一些不透明度的图片,并在其中添加一些文字。 我已经提到这个链接setting opacity for background image并尝试实施它。我有文字,但没有图像。设置不透明度的背景图像与网址在css
下面是代码:
HTML:
<div class="page-header head">
<div class="hbg"></div>
Hi there
</div>
CSS:
.head{
position: relative;
z-index: 1;
margin-top:10px;
height: 170px;
}
.head .hbg
{
background: url('hbg.png');
background-size: 100% 100%;
opacity: 0.3;
z-index: -1;
}
什么是这里的问题?
“问题是什么吗?”那么,你应该告诉我们... – feeela 2014-10-17 15:32:51