I can't manage to set a bottom spacing between my modal and the screen's bottom limit! In my CSS, I've set the "ion-modal-view" elements CSS height and width to some percentage and gave values to left, right, top and bottom accordingly, everything works as expected, my modal is centered, but I can't detach it from the bottom.
Any help?
Finally, I've managed to get it working by wrapping my ion-modal-view
with a div
that applies a min-height: 0;
directive on the modal
class, this made my custom margin effective.
<div class="adic-modal">
<ion-modal-view class="adic-popup">
<!--some content-->
</ion-modal-view>
</div>
This is the 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;
}
I need to know though if what I did is the right approach.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.