【问题标题】:ionic 3 responsive popover sizeionic 3 响应式弹出框大小
【发布时间】:2018-02-21 12:02:43
【问题描述】:

我正在使用 ionic 3 并且有一个使用固定高度的弹出框

editOpty(rw){
     let popover = this.editOptyPopup.create(EditOptyPopoverComponent, rw, { cssClass: 'edit-opty-popover'});
    popover.present({

    });
  }

css 是这样的:

.edit-opty-popover .popover-content{
        width: 1400px;
 }

固定宽度的缺点很明显。我所需要的只是弹出窗口的宽度比屏幕(我使用的那个)宽度小几个像素。

【问题讨论】:

    标签: css angular typescript sass ionic3


    【解决方案1】:

    您可以在这里尝试%

    .edit-opty-popover .popover-content{
            max-width: 90%;
     }
    

    【讨论】:

      【解决方案2】:

      考虑以下几点:

      width:calc(100vw - 5px) 
      

      width:calc(100% - 5px) 
      

      取决于你的需要。

      【讨论】:

        猜你喜欢
        • 2015-01-02
        • 1970-01-01
        • 1970-01-01
        • 2021-03-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多