0

ここに画像の説明を入力

やあ

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);
}
4

1 に答える 1

0

これにより、オーバーレイDIVがページ全体をカバーするようになり、画面サイズがどれだけ大きいか、コンテンツがスクロールされているかどうかに関係なく役立ちます。

CSS:

.ui-popup-screen {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left:0 !important;
}

このCSSブロックはjsFiddle例でテストされているので、100% 確実に機能します。そうでない場合は、別の解決策を見つけます。

于 2013-06-21T11:23:20.860 に答える