移动< select>上的箭头位置菜单 [英] Moving the arrow position on a <select> menu

查看:915
本文介绍了移动< select>上的箭头位置菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用CSS从右向左移动选择框上的下拉箭头?

Is it possible to move the dropdown arrow on a select box from right to left with CSS?

推荐答案

EDIT:,正如我怀疑这也改变列表中选项的文本方向,因此您不能使用方向。除此之外,除了使用自定义下拉控件之外没有任何其他方法。请参阅此问题的答案。

just as I suspected this changes the text direction of the options in the list as well, so you can't use direction. Besides that, there isn't any other way than to use a custom drop-down control. See the answers to this question. I'll just leave my original answer below for anyone curious.

您应该能够 >使用 方向 属性,但我尚未验证这是否适用于浏览器,平台和区域设置:

You should be able to use the direction property, but I haven't verified if this works across browsers, platforms and locales:

select { direction: rtl; }

使用 direction 因为规范建议不要使用DTD作者或作者的任何人特殊文档:

Be careful when using direction though, as the spec advises against its use by anyone but DTD authors or authors of special documents:


由于文本的方向性取决于文档语言的结构和语义,这些属性在大多数情况下只有文档类型描述(DTD)的设计者或特殊文档的作者。如果默认样式表指定这些属性,作者和用户不应指定规则来覆盖它们。

Because the directionality of a text depends on the structure and semantics of the document language, these properties should in most cases be used only by designers of document type descriptions (DTDs), or authors of special documents. If a default style sheet specifies these properties, authors and users should not specify rules to override them.

这篇关于移动< select>上的箭头位置菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆