Joh*_*ith 4 html css styles opacity
我有两个div,外部和内部div.我有一个背景图像,外部div有一个不透明度设置,但我似乎无法让内部div不继承外部div的不透明度.我希望内部div是纯色.
我的代码在下面,这里有一个jsfiddle:http://jsfiddle.net/3TK3U/
<style type="text/css">
body
{
background-image:url('http://media-bubble.info/images/layout/background.png');
}
.outsideBox {
width:70%;
height:200px;
background-color: #ffffff;
opacity:0.7;
filter:alpha(opacity=70);
text-align:center;
}
.insideBox {
width:40%;
height:80px;
background-color: #999;
z-index:999999;
}
</style>
<div id="Introduction" class="outsideBox">
<div id="Introduction" class="insideBox">This is the inside box which should not inherit transparancy</div>
</div>
Run Code Online (Sandbox Code Playgroud)