如何制作< option>宽于< select>在IE6中? [英] How to make <option> wider than <select> in IE6?

查看:75
本文介绍了如何制作< option>宽于< select>在IE6中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<select>的宽度为60px

,但是<option>的内容比这更长.

but the content of <option> is longer than that.

其中隐藏在IE6中.

该如何解决?

推荐答案

我知道这已经是几年后的事了,但是它可能会帮助寻找解决方案的人.

I know this is years later but it may help someone searching for a solution.

您可以在CSS中通过设置选中对象的宽度来做到这一点,例如

You can do it in CSS by setting the select's width when it is in focus, e.g.

select {
    width: 100px; /* normal state */
}

select:focus {
    width: 200px; /* wider when in focus */
}

全文,网址为 http://dinowebs.net/?p=114

这篇关于如何制作&lt; option&gt;宽于&lt; select&gt;在IE6中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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