我想使用选择框,当溢出时在选择框中显示滚动
css
#selectbox{
width:100%;
overflow: scroll;
}
HTML
<div style="width:140px;">
<select name="selectbox" size="5" id="selectbox">
<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>
<option value="1">one two three four five six</option>
<option value="2">seven eight</option>
<option value="3">nine ten</option>
</select>
</div>
但只显示垂直滚动。如何解决这个问题?