离子模态底部间距

was*_*ans 3 css ionic-framework

我无法设置我的模态和屏幕底限之间的底部间距!在我的CSS中,我将"离子模态视图"元素的CSS高度和宽度设置为某个百分比并相应地给出了左,右,上,下的值,一切都按预期工作,我的模态居中,但我可以不要从底部拆下它.

有帮助吗?

was*_*ans 7

最后,我已经成功地得到它的包装我的工作ion-modal-viewdiv其施加min-height: 0;的指令modal级,这使我的自定义保证金有效.

<div class="adic-modal">
    <ion-modal-view class="adic-popup">
        <!--some content-->
    </ion-modal-view>
</div>
Run Code Online (Sandbox Code Playgroud)

这是CSS:

.adic-modal .modal {
    min-height: 0 !important;
}

.adic-popup {
    width: 90%;
    height: 60%;
    top: 20%;
    bottom: 20%;
    right: 5%;
    left: 5%;
    background-color: #ffffff;
}
Run Code Online (Sandbox Code Playgroud)

我需要知道,如果我做的是正确的方法.