利用css如何让嵌套的div层不继承父div层的透明度?

利用css如何让嵌套的div层不继承父div层的透明度?

http://blog.csdn.net/foart/article/details/39177653
 
 
 
 

<style media="screen">
.yss{
200px;
height:200px;

}
.ys{
200px;
height:200px;
/*background-size:200px 200px;*/
/*background:url('/images/logosmall.jpg');*/

background:url('@picstr');
background-position: 50% 50%;
background-repeat:no-repeat;
background-size: 200px 200px;

}
.kss{
200px;
height:200px;
/*background:url('/images/logosmall.jpg');*/
/*background-size:200px 200px;*/
background:url('@picstr');
background-position: 50% 50%;
background-repeat:no-repeat;
background-size: 200px 200px;
opacity:0.4;
filter:"alpha(opacity=40)";
-ms-filter:"alpha(opacity=40)"; /* 旧版IE */

}
.edd{
200px;
height:200px;
border:0px solid black;
/*position:relative;*/
position:absolute;
margin-top:-200px;
/*margin-left:-200px;*/
}

.svgks{
200px;
height:200px;
border:0px solid black;
/*position:relative;*/
position:absolute;
margin-top:-200px;
/*margin-left:-200px;*/

opacity:0;
filter:"alpha(opacity=0)";
-ms-filter:"alpha(opacity=0)"; /* 旧版IE */
}
</style>

@if (cwords != null)
{
<input type="hidden" name="svgid" id="svgid" value="@(cwords.VectorgraphFile)" />@*
<input type="hidden" name="svgreset" id="svgreset" value="0" />


*@<p id="ppp" class="ys" style="">

</p>
<svg id="svg" class="edd"></svg>

<p id="div3" style="display:none;">
@* @(Userhelper.getwotdtrext(cwords.Id, 2))*@
@* test one is two*@
@(Userhelper.getwotdtrext(cwords.Id, 2))
</p>
<p> &nbsp; &nbsp; &nbsp;<input type="button" id="ani" class="btn btn-success btn-sm" value="Play" onclick="ss();"/>
<input type="button" id="svgreset" class="btn btn-success btn-sm" value="reset" onclick="resets();"/>
</p>

原文地址:https://www.cnblogs.com/lyl6796910/p/4730704.html