app页面用css 的direction 属性解决select 下拉框右对齐

Posted zhoupan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了app页面用css 的direction 属性解决select 下拉框右对齐相关的知识,希望对你有一定的参考价值。

direction 属性规定文本的方向 / 书写方向。

select标签

<div class="mui-input-row mir">
   <label style="margin-left: 5px;">部门</label>
   <select dir="rtl" id="dept" style="width:50%; height: 30px;">
   </select>
</div>

select的样式

#dept{
    direction: rtl;
}

#dept option{
    direction: ltr;
}

 

以上是关于app页面用css 的direction 属性解决select 下拉框右对齐的主要内容,如果未能解决你的问题,请参考以下文章