可能重复:
I do not want to inherit the child opacity from the parent in CSS
我的页面包含以下<div>
:
<div id="OffDiv">
<asp:Image ID="imgHammer" runat="server" ImageUrl="~/Images/hammer.png" ToolTip="Biding..." />
</div>
和css:
div#OffDiv
{
display: block;
position: fixed;
top: 0px;
right: 0px;
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
z-index: 90000;
background-color: Blue;
filter: alpha(opacity=40); /* internet explorer */
-khtml-opacity: 0.4; /* khtml, old safari */
-moz-opacity: 0.4; /* mozilla, netscape */
opacity: 0.4; /* fx, safari, opera */
text-align: center;
}
#imgHammer
{
margin-top: 100px;
z-index: 90001
filter: alpha(opacity=100); /* internet explorer */
-khtml-opacity: 1; /* khtml, old safari */
-moz-opacity: 1; /* mozilla, netscape */
opacity: 1; /* fx, safari, opera */
z-index: 90001;
}
问题是imgHammer
在呈现后具有低{0}的不透明度(意味着.4)。
如何将其不透明度更改为1?
答案 0 :(得分:1)