我用过这个css样式,但它什么也没做 -6ren">
gpt4 book ai didi

jquery - 在 jQuery Mobile 中重新调整选择框的大小?

转载 作者:行者123 更新时间:2023-11-28 10:13:26 24 4
gpt4 key购买 nike

我想缩小 jquery mobile 中的选择框,,

这是我的代码:

 <td >
<select id="nlocation1" name="nlocation1" data-mini ="true" />

<?php
$sql1="select * from apps.xx_fa_location_mob order by description";
$res= oci_parse($link, $sql1);
oci_execute($res);

while ($row = oci_fetch_array($res))
{
$str = $row[2] ;
$str_id = $row[1];
echo "<option value = '$str_id' >$str</option>";

}



?>

</select></td>

我用过这个css样式,但它什么也没做

   <style type="text/css">
#nlocation1.ui-controlgroup-controls{
width: 50% !important;
}

</style>

我应该如何缩小选择框,请提供任何帮助,我们将不胜感激

最佳答案

将css应用于.ui-select

.ui-select{width: 50% !important;}

如果你想应用到特定的选择框

<td id="myFirstSelect" >
<select id="nlocation1" name="nlocation1" data-mini ="true" />

并将CSS添加为

#myFirstSelect .ui-select{width: 50% !important;}

关于jquery - 在 jQuery Mobile 中重新调整选择框的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24300610/

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