gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 14:53:15 26 4
gpt4 key购买 nike

我有一个下拉列表,其中的选项在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com