HTML select tag text direction

柔情痞子 提交于 2019-12-11 03:33:41

问题


There is a way to create a right-to-left text-direction select tag in HTML?

The following works in IE, but in Firefox only align the text and in Chrome nothing...

<select dir="rtl">
<select style="direction: rtl;">

回答1:


In Firefox I think you'll also need to set bidi-override:

<select dir="rtl" style="direction: rtl; unicode-bidi: bidi-override;">
    <option style="direction: rtl; unicode-bidi: bidi-override;">test</option>
</select>



回答2:


It works fine for me on Chrome 8.x dev. I'm sure it is a bug that's already fixed.

See: http://jsfiddle.net/Qjxv6/



来源:https://stackoverflow.com/questions/4058326/html-select-tag-text-direction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!