水平滚动条无法在Internet Explorer中选择标记

时间:2015-10-20 13:25:16

标签: html css internet-explorer

水平滚动条不适用于Internet Explorer中的选择标记。

示例:

<select multiple="multiple" style="width: 250px; overflow-x: auto">
  <option value="4">Option 1</option>
  <option value="4">Option 2</option>
  <option value="4">Veeeeeeeeeeeeeeeeeeeeeeeryyyy Long Option</option>
  <option value="4">Option 3</option>
</select>

铬:

Chrome

Internet Explorer:

Internet Explorer

如何在IE中使select标签水平滚动?

2 个答案:

答案 0 :(得分:0)

这可能有效:

select{
    overflow-x: hidden;
}

select:hover{
    overflow-x: scroll;
}

被授予,用户在元素悬停之前不会看到滚动条。

答案 1 :(得分:0)

把它放在一个div中并设计它:

<div style="width: 250px; overflow-x:scroll;">
<select multiple="multiple" >
     <option value="4">Option 1</option>
     <option value="4">Option 2</option>
     <option value="4">Veeeeeeeeeeeeeeeeeeeeeeeryyyy Long Option</option>
     <option value="4">Option 3</option>
</select>
</div>