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

查看:87
本文介绍了如何在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天全站免登陆