IE10选择框问题 [英] IE10 Select box issue

查看:98
本文介绍了IE10选择框问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在IE10中测试我的应用程序,但发现选择框的行为异常.选中的选项突出显示,并且上方/下方的选项显示在所选上方/下方.下拉框被隐藏.

I was testing my application in IE10 and found a strange behavior for select box. The option selected is highlighted and options above/below are displayed above/below the selected one. The drop down box is hidden.

这仅在IE10中发生.在所有其他浏览器中,选项将显示在选择框下方.

This happens only in IE10. In all other browsers, options are displayed below the select box.

尝试在IE10和IE9中使用以下示例代码:

Try with below sample code in IE10 and IE9:

<!DOCTYPE html>
<html>
    <body>
        <select>
            <option value="volvo">Volvo</option>
            <option value="saab">Saab</option>
            <option value="opel">Opel</option>
            <option value="audi">Audi</option>
        </select>
    </body>
</html>

是否可以像往常一样在选择框下方进行选择,或者IE10有任何漏洞?

Is there any way to make the options below the select box like usual or there is any hack for IE10?

谢谢.

推荐答案

这是Internet Explorer 10中此控件的默认行为.根据列表中项目的数量和屏幕的大小,其他浏览器将显示菜单也有所不同-尽管我认为IE10是唯一的浏览器,当打开下拉菜单时,它将平衡select元素上方和下方的项目数量.

This is the default behavior for this control in Internet Explorer 10. Depending on the number of items in the list and the size of the screen, other browsers will display the menu differently as well - though I think IE10 is the only browser that will balance the number of items above and below the select element when the dropdown is opened.

这篇关于IE10选择框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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