gpt4 book ai didi

html - 覆盖内联样式

转载 作者:行者123 更新时间:2023-11-27 22:28:35 25 4
gpt4 key购买 nike

我将以下样式赋予 CSS 文件以覆盖控件的 z-index 但它不起作用。这段代码有什么问题?如何用 !important 覆盖 ajaxToolkit 的内联样式?

.aspx页面

<ajaxToolkit:ModalPopupExtender id="mpeOptions" runat="server" 
popupcontrolid="PanelOptions" targetcontrolid="btnShowOptions"
cancelcontrolid="btnCloseOptions" backgroundcssclass="modalBackground"
/>

css 页面

.modalBackground[style] {
z-index: 300 !important;
}

运行时将其转换为

<div    class="modalBackground" 
id="AccordionPaneStep3_content_mpeOptions_backgroundElement"
style="left: 0px; top: 0px; display: none; position: fixed;
z-index: 10000;"
/>

最佳答案

何时使用 z 索引需要绝对或相对或固定位置

.modalBackground[style]
{
z-index: 300 !important;
position:relative !important; or
position:absolute !important;
}

关于html - 覆盖内联样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20658636/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com