select option的对齐方式

Posted fengyuzhen34

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了select option的对齐方式相关的知识,希望对你有一定的参考价值。

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

ltr - 默认。文本方向从左到右。
rtl - 文本方向从右到左。
inherit - 规定应该从父元素继承 direction 属性的值。

在CSS里设置你的 select 添加 direction 属性,值为 rtl 可将select内的option的文字右对齐.
ul li select,
select option {
direction: ltr;
}











以上是关于select option的对齐方式的主要内容,如果未能解决你的问题,请参考以下文章