繁体   English   中英

离子模态底部间距

[英]Ionic Modal bottom spacing

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

有帮助吗?

最后,我设法通过使用应用min-height: 0;div包装ion-modal-view来使其工作min-height: 0; modal类的指令,这使我的自定义边距有效。

<div class="adic-modal">
    <ion-modal-view class="adic-popup">
        <!--some content-->
    </ion-modal-view>
</div>

这是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;
}

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM