【发布时间】:2015-08-21 11:33:28
【问题描述】:
我有这个 Javascript
$(function () {
var $select = $(".comboboxValues");
for (i = 1; i <= 99; i++) {
$select.append($('<option></option>').val(i).html(i))
}
});
在这个 HTML 元素上
<td class="imageClass">
<select class="comboboxValues select"></select>
</td>
使用这个 CSS
.comboboxValues
{
font-family:Segoe UI;
text-align:center;
}
.select
{
margin: 0px;
padding: 0px 5px 0px 5px;
border: 0px;
outline: 0px;
border-bottom : 1px solid #6F8393;
color: #384046;
background: transparent;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-user-select: none;
-moz-user-select: none;
-webkit-padding-start: 10px;
-moz-padding-start: 10px;
-webkit-padding-end: 10px;
-moz-padding-end:10px;
padding-top: 2px;
padding-bottom: 2px;
}
此代码用于在桌面和移动 android 上用值填充组合框,但在 iPad 上不可用。
为什么这在 iPad 上不起作用,我该如何解决?
【问题讨论】:
-
“不工作”是指 iPad 上的组合框为空,没有可供选择的选项。
标签: javascript ios css ipad combobox