像Ionic 2中的Modal一样警觉 [英] Alert like Modal in Ionic 2

查看:212
本文介绍了像Ionic 2中的Modal一样警觉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在警报中想要很多功能,所以我在模态中实现了所有的东西...现在我想把这个模态切割成一个警告,就像不占用屏幕上的整个空间并在空间上显示bg我们的模式。
,如下图所示





<例如:你能不能告诉我在模态之外实现它以使它看起来像一个警报..
in ionic 2



请帮助感谢advane

解决方案

你可以在scss的帮助下进行调整

  .modal-wrapper {
position:absolute;
宽度:90%;
身高:65%;
top:20%;剩余
:5%;
}

您可以根据需要更改内容宽度,高度,顶部和左侧。请注意,修改此值将使应用程序中的所有模态都使用此配置而不是默认模式。



要以灰色显示背景,请使用以下代码

  @media not all and(min-height:600px)and(min-width:768px){
ion-modal ion-backdrop {
visibility:visible;
}
}


I wanted many functionalities in my alert so i implemented all the things in a modal...now i want to cutomize this modal as an alert like not taking the whole space on the screen and showing the bg on the space left outsude our modal. as shown in the image below

eg: can you tell me ow to implement outside the modal so that it looks like an alert.. in ionic 2

please help thanks in advane

解决方案

You can adjust this with the help of scss

.modal-wrapper {
    position: absolute;
    width: 90%;
    height: 65%; 
    top: 20%;
    left: 5%;
  }

You can alter the content width, height, top and left as per your need. Kindly note that modifying this value will make all the modal in your application to use this configuration rather than the default modal.

To show the backdrop in grey color, use the below code

@media not all and (min-height: 600px) and (min-width: 768px) {
  ion-modal ion-backdrop {
    visibility: visible;
  }
}

这篇关于像Ionic 2中的Modal一样警觉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆