Why does “size” property doesn't shows up mult

2019-08-27 08:26发布

问题:

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>