【问题标题】:IE 6 dropdown selection area too narrowIE 6 下拉选择区域太窄
【发布时间】:2010-12-24 02:18:34
【问题描述】:

我有一个宽度设置为 142 像素的下拉菜单,但是下拉菜单时的选择区域需要更大,因为它包含超过此宽度的文本。 Firefox(和大多数现代浏览器)很聪明,并扩展了选择区域以适应此文本。但是,IE 6 和未选中的较新版本的 IE 不会显示此文本,并且选择区域的宽度与未单击的下拉列表的宽度相同。问题出在这里,如何让 IE 扩展您单击所需选择的选择区域,而不增加下拉区域的宽度而不显示下拉选择。希望这是有道理的。

:D 欢呼 (DEATH TO IE)

【问题讨论】:

标签: css internet-explorer-6 drop-down-menu cross-browser


【解决方案1】:

恐怕你不能。即使在最好的时期,对下拉框的控制也很少,IE6 通常被认为是最糟糕的时期。

【讨论】:

    【解决方案2】:

    我自己试错了一个快速的'n'dirty(Yahoo hack 是臃肿的,但如果你想要动画增长/收缩更好):

    <html>
    <body>
      <select style="width:100px;" onmouseover="this.style.width='auto'; this.focus();" onblur="this.style.width='100px';">
        <option>Tiny</option>
        <option>Und das verrry, verrrry, verrrrrrrrrrry long one!</option>
      </select>
    </body>
    </html>
    

    【讨论】:

      猜你喜欢
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-29
      • 2011-10-18
      • 2018-05-19
      • 1970-01-01
      相关资源
      最近更新 更多