<select id="selectId" name="name1" style="height:10% !important;" >
<option>Select One</option>
<option>xxx</option>
<option>yyy</option>
<option selected="selected">rrr</option>
<option>ggg</option>
<option>fff</option>
<option>qqq</option>
</select>
如何设置选择的宽度和高度。我正在使用 jquery 移动 css,我无法完成这项工作。请帮助我
提前致谢
最佳答案
您需要更改此 css 类 .ui-select
试试这个:
.ui-select{
width:200px;
height:70px;
}
检查 Demo
如果您只想影响那个选择,请在 Jquery 中使用 id 来定位它:
$(document).ready(function(){
$('#selectId').closest('.ui-select').addClass('select_small')
})
有了这个你可以添加这个类:
.select_small{
width:200px;
height:70px;
}
检查另一个 DEMO
关于javascript - Jquery Mobile——如何覆盖选择框的高度和宽度。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21259185/