如何在IE中的选择框中获得水平滚动条? [英] How to get horizontal scroll bar in select box in IE?

查看:101
本文介绍了如何在IE中的选择框中获得水平滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试实现以下代码

<div class="functionitem" id="selector_cat">
  <select name="sets" style="overflow:auto;width:100px;">
    <option value="general">happy holiday</option>
    <option value="garden">Garden</option>
    <option value="Lunch">Lunch</option>
    <option value="nice day">A nice day out with my friend on the beach</option>
  </select>
</div>

第四个选项菜单缺少,任何人都可以告诉我在IE中的水平滚动工作,如果没有,是否有任何其他方法,可以让它的工作,谢谢!

The right part of the 4th option menu is missing, Can anyone tell me make the horizontal scroll work in the IE, if not, is there any other ways that could get it work, thank you!

对于任何混乱,我想要的是一个水平滚动条在下拉框中,我想要它的固定宽度100px;但我想显示整个内容,假设用户可以滚动到右边,如果他们想看到下拉选择框中的整个句子,

sorry for any confusion, what i want is that a horizontal scroll bar in the drop down box, I want it fixed width 100px; but I want to display the whole content, I assume user can scroll to the right if they want to see the whole sentence in the drop down select box,

推荐答案

我不太确定你想要达到的目标。这只是一个 select 列表。只需删除您的样式,它会自动调整为您的内容。

I’m not really sure what you’re trying to achieve. This is simply a select list. Just remove your styling and it will automatically size to your contents.

列表滚动。注意:这是可用性有点问题,所以我会寻找另一个解决方案之前实现这样的页面上。

Make the container that contains the list scroll. Note: the usability of this is somewhat questionable so I would look for another solution prior to implementing something like this on a page.

<div id="selector_cat"> 
    <select name="sets">
        <option value="general">happy holiday</option>
        <option value="garden">Garden</option>
        <option value="Lunch">Lunch</option>
        <option value="nice day">A nice day out with my friend on the beach</option>
    </select>
</div>



#selector_cat{
    width: 100px; 
    overflow: auto;
}

这篇关于如何在IE中的选择框中获得水平滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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