html下拉列表的问题

发布于 2024-10-09 00:50:09 字数 114 浏览 0 评论 0原文

我的 html 下拉选择框有问题。我在选择框中有一长串项目,因此它超出了我的屏幕。它不显示滚动条。请帮忙 替代文本

I am having problem with my html drop down select box. I have long list of items in select box therefore it goes outside of my screen. it doesn't shows scroll bar. Please help
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

┾廆蒐ゝ 2024-10-16 00:50:09

尝试强制大小

<select ... size="1">

Try forcing the size:

<select ... size="1">
尤怨 2024-10-16 00:50:09

你能发布 HTML 和任何样式化选择的 css 吗?检查 Firebug 中的 select 元素并查看溢出属性的设置(它应该默认为 auto 并在必要时创建滚动条)。

<select id="#long-select> 
    <option ...>...</option>
    <option ...>...</option>
    ...
</select>

然后对应的CSS:

#long-select { overflow: auto; }

Could you post the HTML and any css that styles the select? Inspect the select element in Firebug and see what the overflow attribute is set that (it should default to auto and create the scrollbar if necessary).

<select id="#long-select> 
    <option ...>...</option>
    <option ...>...</option>
    ...
</select>

Then the correspond CSS:

#long-select { overflow: auto; }
暮倦 2024-10-16 00:50:09

尝试在 IE 中打开页面,应该显示所有元素。

我认为这是 Firefox 中的一个错误,列表元素始终与选择字段对齐。 IE 不会在屏幕外显示列表。

Try opening your page in IE, should show all elements.

I think it is a bug in Firefox, that the list element is always aligned to the select field. IE does not show the list outside of the screen.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文