我可以控制IE 10选择框的定位吗? [英] Can I control positioning of IE 10 select boxes?
问题描述
在Internet Explorer 10中,下拉框(< select>
元素)的行为已更改:在展开框时,而不是将选项列表放在下面字段,列表覆盖该字段,并且列表位置使得当前选择的元素位于输入字段的中心。
这有点难以描述,
In Internet Explorer 10 the behavior of drop-down boxes (<select>
element) has changed: when expanding the box, instead of placing the list of options below the field, the list overlays the field, with the list positioned so that the currently-selected element is centered over the input field.
This is a little hard to describe, so here's a jsFiddle that shows it.
Our users are finding this behavior very confusing. Is there anything I can do in CSS to make the box behave like it did in IE9, and like every other major browser? (Perhaps something like the -ms-clear pseudo-element that hides the clear button in IE10 text input fields.)
Here's a sort of time-lapse screenshot:
One option is dynamically change size
property of the select to the number of options (or a fixed number - if you have too many options). You would do it on mouse-down, and change it back on-change.
Style, Position of select as well as additional events will have to be tweaked - but here is the proof of concept: http://jsfiddle.net/KnAXL/1/
这篇关于我可以控制IE 10选择框的定位吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!