如何在选择列表中显示扩展选项? [英] How to show extended option in select list?

查看:148
本文介绍了如何在选择列表中显示扩展选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用固定宽度选择标记时,IE中有一个错误。当选择标签中的选项的内容大于选择标签的宽度时,其隐藏。它在fire fox工作很好,不是在IE。

While using fixed width select tag , there is one bug in IE. When the content of the option in the select tag is more than the width of select tag its hide. Its working fine in fire fox , not in IE.

推荐答案

这是IE中的一个错误,没有办法解决它,选择框更宽:

This is a bug in IE, and there is no way to solve it, apart from making the select box wider:

<select style="width: 500px;">
  <option value="1">
    This is a very long option, but it's cool, cause the select is also very long
  </option>
</select>

另一个替代方法是使用一个框架,用一个样式化的其他元素组合来替换选择框。他们的行为就像一个选择框,但需要javascript才能正常工作。

Another alternative is to use a framework that will replace the selectbox with a styled combination of other elements. They will behave like a selectbox, but require javascript to work.

这篇关于如何在选择列表中显示扩展选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆