css - 下拉宽度——IE标签裁剪

标签 css

我知道可以为下拉菜单设置 CSS 宽度。在 FF 中,顶部窗口会受到它的影响,而选项项会根据其中的内容缩放,但在 IE 中,选项也会与窗口一样宽,从而削减了选项的标签。

是否有更好的方法来控制 SELECT 元素的宽度?

<select style="width:100px">
    <option>Very long label 1 is gpoing to be here</option>
    <option>Very long label 2 is gpoing to be here</option>
</select>

enter image description here

最佳答案

  • 与开发人员交谈时,请引用 select 元素作为 select 元素,因为“下拉”可以推断出其他内容 完全。

  • 有一个修复 here .

关于css - 下拉宽度——IE标签裁剪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7585512/

相关文章:

css - 在容器 div 中定位 mapbox/leaflet map

html - 用于显示标签/值数据的 html 标记是什么?

animation - webkit css3 动画循环

css - 如何更改基于移动设备的 CSS?

javascript - 来自 jsfiddle 的代码不起作用

javascript - 将类的 div 调整为最大

jquery - 如何在单击 Bootstrap 时延迟加载 Google map ?

css - "margin: 0 auto;"工作到底需要什么?

html - 我想完全掌握包含 div 的 'position: relative' 的概念

html - 在 Chrome 中,我的文本隐藏在背景图像后面