iOS 6 Select Menu vs iOS 7 Select Menu

前端 未结 2 1213
离开以前
离开以前 2021-01-24 01:36

The select menu (the pinwheel) within the new iOS 7 truncates the items as shown in this photo.

Is there anyway to prevent the truncating that\'s occurring by default s

相关标签:
2条回答
  • 2021-01-24 02:14

    As said here ( -> Line Break in HTML Select Option?) you sadly aren't able to insert a line break into an <option> tag (I tried it myself with several possible solutions but it didn't work). So I really don't understand why Apple changed this to be only one row of text. I would recommend using jQuery Mobile (very easy to learn and use) because it has it own independent and customizable select form element (look for "Custom select menu" in the API docs -> http://api.jquerymobile.com/selectmenu/).

    0 讨论(0)
  • 2021-01-24 02:22

    Well, as it turns out, if I insert a fake option group label it disables the truncating.

    How to fix truncated text on <select> element on iOS7

    <select>
      <option selected="" disabled="">Select a value</option>
      <option>Grumpy wizards make toxic brew for the evil Queen and Jack</option>
      <option>Quirky spud boys can jam after zapping five worthy Polysixes</option>
      <option>The wizard quickly jinxed the gnomes before they vaporized</option>
      <option>All questions asked by five watched experts amaze the judge</option>
      <optgroup label=""></optgroup>
     </select>
    
    0 讨论(0)
提交回复
热议问题