Why does “size” property doesn't shows up multiple options like a list box on a mobile device?

╄→гoц情女王★ 提交于 2019-12-12 01:32:45

问题


I am building a Mobile application using Phone-gap.I am stuck at one place.

If i set size="5" it shows up list box with 5 elements in safari and Firefox browser(I tested on those two) but it shows up like a dropdown only when testing on device(iPhone and Android).

Any idea how to fix the issue?

<div>

<select name="mySelect" id="mySelect" size="5">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

<option value="5">5</option>

</select>

</div>

回答1:


There is little you can do with selects and not many options available. I usually run into dead ends.

You could try unordered lists.

<ul>
    <li></li>
    <li></li>
</ul>


来源:https://stackoverflow.com/questions/14334357/why-does-size-property-doesnt-shows-up-multiple-options-like-a-list-box-on-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!