为什么在Firefox中没有用于选择的水平滚动条 [英] Why there is no horizontal scrollbar for select in firefox
本文介绍了为什么在Firefox中没有用于选择的水平滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在FireFox中没有用于此类选择的水平滚动条?
Why there is no horizontal scrollbar in FireFox for such select?
<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/
It works in Chrome just perfect 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>
这是来自选择html框的水平滚动,并显示水平滚动条.
This one is from Select box html horizontal scroll and show the horizontal scrollbar.
这篇关于为什么在Firefox中没有用于选择的水平滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文