Ionic2 Popover改变宽度 [英] Ionic2 Popover Change Width

查看:230
本文介绍了Ionic2 Popover改变宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改仅1页的弹出框宽度。
我试过这个:

I want to change the popover width of only 1 page. I tried this:

我不想在这个 $ popover-ios-width 中使用variable.scss文件
,因为它改变了所有页面的宽度。

I do not want to use this $popover-ios-width in variable.scss files since it changes the width on all pages.

推荐答案

@ gabriel-barreto的answer 完全没问题。但是,我想在其他版本中需要额外考虑。

@gabriel-barreto's answer is totally fine. However, I guess it needs an additional consideration in other versions.

在Ionic 3.6中,自定义类被添加到< ion-popover> 元素。要覆盖 .popover-content 类中的默认宽度规则集,您的选择器应为:

In Ionic 3.6 the custom class is added to the <ion-popover> element. In order to override the default width rule set in .popover-content class, your selector should be:

.custom-popover .popover-content {
  width: 60%;
}

这篇关于Ionic2 Popover改变宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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