Asp.net 模式弹出窗口出现在Ajax控件工具包的模式背景后面
问题: 在IE8下,Ajax控制工具包的弹出面板落在modalBackground下面,请参见屏幕截图。这只发生在IE8中 以前的尝试: 我尝试覆盖z索引,它看起来像css文件中的z索引问题:Asp.net 模式弹出窗口出现在Ajax控件工具包的模式背景后面,asp.net,internet-explorer,ajaxcontroltoolkit,modal-dialog,Asp.net,Internet Explorer,Ajaxcontroltoolkit,Modal Dialog,问题: 在IE8下,Ajax控制工具包的弹出面板落在modalBackground下面,请参见屏幕截图。这只发生在IE8中 以前的尝试: 我尝试覆盖z索引,它看起来像css文件中的z索引问题: .modalPopup { background-color: white; width:200px; height:150px; z-index:100000001 !important; } 这个问题仍然存在。使用Firefox中的firebug,当用户点击按钮显示
.modalPopup
{
background-color: white;
width:200px;
height:150px;
z-index:100000001 !important;
}
这个问题仍然存在。使用Firefox中的firebug,当用户点击按钮显示模式弹出窗口时,我可以检查z索引中的更改,并且z索引正确更改
代码:
我还尝试将modalBackground的z指数设置得更低,但没有成功
问题:
以前有人有过这个问题吗?如果是的话,你能给我指出正确的方向吗?
如果你没有这个问题,你会看些什么?我完全没有主意了
尝试更改属性
位置:固定;位置:绝对 我发布的任何内容都没有这个问题。问题在我们的模板中的某个地方,可能是一个标签未关闭 设置面板背景色BackColor=白色;它将解决您的问题。我刚刚检查过,感谢您的尝试,但它没有解决问题:只是一次尝试。尝试设置显示:内联;您可以下载AjaxToolKit的代码,找到ModalPopupXtender的z索引设置位置,并增加该值。然后编译自己的dll并使用它。当我无法覆盖嵌入式资源的样式时,我不得不这样做。
<asp:ModalPopupExtender ID="MPsdE" runat="server" Enabled="true" DynamicServicePath=""
OkControlID="OkButton"
CancelControlID="CancelButton"
TargetControlID="MoreServers"
PopupControlID="ModalPanel"
BackgroundCssClass="modalBackground" >
</asp:ModalPopupExtender>
<asp:Panel ID="ModalPanel" runat="server" >
<div class="modalPopup" >
test <asp:Button ID="OkButton" runat="server" Text="Okay"/>
<asp:Button ID="CancelButton" runat="server" Text="Cancel"/>
</div>
</asp:Panel>
.modalBackground
{
position:fixed;
background-color:#000;
filter:alpha(opacity=50);
opacity:0.5;
}
.modalPopup
{
background-color: white;
width:200px;
height:150px;
z-index:100000001 !important;
}