我有一个像这样声明的叠加层的对话框:
.ui-widget-overlay {
position: absolute;
left: 8px;
top: 9px;
height: 985px !important;
width: 518px !important;
}
我拥有的页面将有两个不同的页面高度。为了解决这个问题,我在我的 JS 文件中做了这个:
如果小一个可见:
$('.ui-widget-overlay').css("height", "985px !important");
别的
$('.ui-widget-overlay').css("height", "1167px !important");
显然这不起作用。还有其他方法可以超越!important
吗?
该页面可以来回切换,因此我需要始终拥有一个或另一个。另外,如果我不添加!important
到 css 中,那么覆盖层将无限扩展高度(它在 facebook 中,所以我假设那里有问题)
有什么建议么?