你好
我正在使用theme="a"
,data-overlay-theme="a"
和data-dismissible="false"
。但它不适用于iPad的整个页面。如何在整个屏幕上应用,使其看起来很好。
我也用过这个:
$(document).on('popupafteropen', '[data-role="popup"]', function(event, ui) {
$('body').css('overflow', 'hidden');
}).on('popupafterclose', '[data-role="popup"]', function(event, ui) {
$('body').css('overflow', 'auto');
});
这是我的代码。 jquery css
.ui-popup-screen {
background-image: url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); /* Necessary to set some form of background to ensure element is clickable in IE6/7. While legacy IE won't understand the data-URI'd image, it ensures no additional requests occur in all other browsers with little overhead. */
top: 0;
left: 0;
right: 0;
bottom: 1px;
position: absolute;
filter: Alpha(Opacity=0);
opacity: 0;
z-index: 1099;
}
.ui-popup-screen.in {
opacity: 0.5;
filter: Alpha(Opacity=50);
}
.ui-popup-screen.out {
opacity: 0;
filter: Alpha(Opacity=0);
}
结构Css **************************
.ui-popup-screen {
background-image: url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); /* Necessary to set some form of background to ensure element is clickable in IE6/7. While legacy IE won't understand the data-URI'd image, it ensures no additional requests occur in all other browsers with little overhead. */
top: 0;
left: 0;
right: 0;
bottom: 1px;
position: absolute;
filter: Alpha(Opacity=0);
opacity: 0;
z-index: 1099;
}
.ui-popup-screen.in {
opacity: 0.5;
filter: Alpha(Opacity=50);
}
.ui-popup-screen.out {
opacity: 0;
filter: Alpha(Opacity=0);
}
答案 0 :(得分:0)
这应该会有所帮助,覆盖 DIV
现在应该涵盖整个页面,无论屏幕大小多大或内容是否滚动。
<强> CSS:强>
.ui-popup-screen {
position: absolute !important;
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
left:0 !important;
}
此 CSS
块已在 jsFiddle
示例中进行了测试,因此我可以100%确定它是否有效。如果没有,我们会找到另一种解决方案。