select 文字右对齐

1、添加 dir 属性,适合中文,但是会导致英文单词或者有空格的地方文字变成从右到左。
<select dir="rtl">
    <option>Foo</option>    
    <option>bar</option>
    <option>to the right</option>
</select>

2、使用 css ,这个方法是比较靠谱的,建议使用

select {
    direction: rtl;
}
select option {
    direction: ltr;
}

参考:http://stackoverflow.com/questions/7920677/text-align-right-on-select-or-option

原文地址:https://www.cnblogs.com/flicat/p/4446784.html