CSS当div弹出时禁用背景 [英] CSS Disable background when div popup
本文介绍了CSS当div弹出时禁用背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在做什么...
This is what I am doing...
.parentDisable {
z-index:999;
width:100%;
height:100%;
display:none;
position:absolute;
top:0;
left:0;
background-color: #ccc;
color: #aaa;
opacity: .4;
filter: alpha(opacity=50);
}
#board_dialog
{
position:absolute;top:3%;left:30%;width:30%;height:210px;display:none;background-color:#ffffff;border:2px solid;
}
HTML:
<div id="board_dialog" title="Do Not Board Comment" class="parentDisable hide">
<div class="popuphdr1">
<div> Do Not Board Comment</div>
<img class="popupclose" src="../lib/img/png/closebutton.png" onclick="$(this).parent().parent().hide()"/>
</div>
<div>
<textarea id="board_textarea" class="popuptextarea"></textarea><br />
<div class="popupfooter">
<input onclick="toggleBoard();" type="button" id = "board_ok_btn" value="Ok" class="popupButton blue"/>
<input onclick="$(this).parent().parent().parent().hide()" type="button" id = "board_cancel_btn" value="Cancel" class="popupButton blue"/>
</div>
</div>
</div>
这会导致显示禁用弹出和活动背景。
This results into showing "disabled pop up" and active background. What am I doing wrong?
推荐答案
我真的不知道你在找什么,但是你的主div )有风格 display:none;
,所以你不会得到任何你做的任何事情。
I don't really know what you're looking for, but your main div (board_dialog) has style display:none;
so you won't get anything whatever you do.
这篇关于CSS当div弹出时禁用背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文