html - 如何在html ionic 3中为弹出模式提供z-index的位置和使用
问题描述
这是我使用模态创建弹出窗口的方式
<div *ngIf="showModal" id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close" (click)="closeMdl()">×</span>
<ion-label style="padding-top: 10vw;
padding-left: 2vw;
white-space: pre-wrap;
font-size: 4.5vw;">Please select mode of Payment and Payment Amount</ion-label>
<ion-grid class="removepadding">
</ion-grid>
</ion-label>
</div>
</div>
scss-
.modal {
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 10vw;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
color: #3b3b3d;
background-color:rgba(48, 47, 46, 0.8);
margin: 25% auto;
padding: 2vw;
padding-top: 0vw;
border-radius: 2vw;
width: 80%;
}
解决方案
推荐阅读
- python - 使用 discord.ext.commands,我如何让机器人发送自己的用户名?蟒蛇3
- android - Flutter 应用程序卡在 Splashscreen 上
- python - Python - 用 Pandas 替换特定值
- javascript - 如何在 JavaScript 中的键内显示带有键的 json 数据?
- python - 使用 selenium 网络驱动程序抓取
- typescript - 为什么我的带有 x-template 的 Vue 模板没有呈现?
- javascript - 如何防止 GIF 循环运行
- java - 日志上没有 NullPointerException
- objective-c - 使用偏移量缩放 vImage_Buffer - Cocoa Objective C
- sql - IN 查询表达式。(错误 3075)。女士访问