html - 下拉列表在 Firefox 中不可见

标签 html css firefox browser

我有一个下拉列表,其中的选项在 Firefox 中不可见,但在 IE 和 Chrome 中都可见。我在下面添加了代码片段。

<!DOCTYPE html>
<html>
<head>
<title>Mozilla Test</title>
</head>
<body>
<select id="product" name="product"  title="Product" tabindex="14" style="padding-top:1px!important;padding-bottom:1px!important;width:100px;>
		<option value="selectFruit" label="--Select--"></option>
		<option value="APP" label="Apple"></option>
		<option value="BAN" label="Banana"></option>
		<option value="GRA" label="Grapes"></option>
</select>
</body>
</html>

谁能帮我解决这个问题。

最佳答案

这似乎是 firefox 中的一个错误。 ( https://bugzilla.mozilla.org/show_bug.cgi?id=40545#c11 )

我假设您尝试过将标签添加为选项元素的内容?

<!DOCTYPE html>
<html>
<head>
<title>Mozilla Test</title>
</head>
<body>
<select id="product" name="product"  title="Product" tabindex="14" style="padding-top:1px!important;padding-bottom:1px!important;width:100px;>
		<option value="selectFruit" label="--Select--"></option>
		<option value="APP" label="Apple">Apple</option>
		<option value="BAN" label="Banana">Banana</option>
		<option value="GRA" label="Grapes">Grapes</option>
</select>
</body>
</html>

关于html - 下拉列表在 Firefox 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27796521/

相关文章:

html - 使 div 视频背景淡出 - 这可能吗?

Firefox 和 contentEditable 跨度

html - 为什么悬停在 css/html 中不允许我更改另一个 div 的样式?

html - 谷歌地图无法正确移动 map

javascript - 具有圆 Angular 的 CSS 按钮,可对点击使用react

html - CSS 直接子选择器未选择

javascript - 使用 Firefox 从 JavaScript 调用 REST API 不起作用

javascript - 尽管我删除了 Firefox 仍然保留带有红色边框的输入字段

html - div 中的 Flex 显示图片不能完全响应并且不能扩展到全宽

html - 帮助蓝图 CSS 框类