为什么在Firefox中没有水平滚动条可供选择

时间:2015-02-18 08:32:41

标签: html css firefox drop-down-menu scrollbar

为什么FireFox中没有用于此类选择的水平滚动条?

<select style="width: 100px; overflow:auto;" size="10">
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
    <option>some long text to make it scroll</option>
</select>

它在Chrome中的功能非常完美 http://jsfiddle.net/r4gnLymr/

1 个答案:

答案 0 :(得分:2)

&#13;
&#13;
div{   
 overflow-x:auto;
 overflow-y:auto;   
 }
&#13;
<div style="width:140px;">
    <select name="selectbox" size="5"  id="selectbox" >
        <option value="1">one two three four five six seven eight</option>
        <option value="2">seven eight</option>
        <option value="3">nine ten</option>
        <option value="1">one two three four five six</option>
        <option value="2">seven eight</option>
        <option value="3">nine ten</option>
        <option value="1">one two three four five six</option>
        <option value="2">seven eight</option>
        <option value="3">nine ten</option>
        <option value="1">one two three four five six</option>
        <option value="2">seven eight</option>
        <option value="3">nine ten</option>
    </select>
</div>
&#13;
&#13;
&#13;

这一个来自Select box html horizontal scroll并显示水平滚动条。