如何在 IONIC 2 中设置 100% 宽度的离子选择组件 [英] How to set ion-select component with 100% width in IONIC 2

查看:13
本文介绍了如何在 IONIC 2 中设置 100% 宽度的离子选择组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将离子选择设置为 100% 的宽度.

I would like to set my ion-select with 100% of width.

我尝试过这样的 css 类:

I have tried with css class like this:

.mySelect { width: 100% !important; }

但它不起作用.

推荐答案

我做到了.

对于需要解决方案的人,这里是代码:

For someone who wants the solution, here is the code:

.myCustomSelect{
  max-width: 100% !important;
}

你必须重写'max-width' css 属性.

You must have to override the 'max-width' css property.

这篇关于如何在 IONIC 2 中设置 100% 宽度的离子选择组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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