Sac*_* R. 6 html css browser firefox
我有一个下拉列表,其中的选项在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>Run Code Online (Sandbox Code Playgroud)
任何人都可以帮我解决这个问题.
这似乎是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>Run Code Online (Sandbox Code Playgroud)