为什么在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/

最佳答案

div{
 overflow-x:auto;
 overflow-y:auto;
 }

<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>





这是来自Select box html horizontal scroll的内容,显示了水平滚动条。

关于html - 为什么在Firefox中没有用于选择的水平滚动条,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28579095/

10-09 06:36