select,option{
text-align:right;
}
然而,并没有什么卵用。后来在:http://stackoverflow.com/questions/7920677/text-align-right-on-select-or-option 找到了解决办法。总结如下: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;
}
亲测,可用!