如何修复< select>中的截断文字元素在iOS7上 [英] How to fix truncated text on <select> element on iOS7

查看:94
本文介绍了如何修复< select>中的截断文字元素在iOS7上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在html select 元素上选择一个选项时,有没有办法阻止iOS7截断文本? iOS7会截断选项文本上的文本,而不是包装它。在我的具体情况下,这是完全无法使用的:

Is there any way to prevent iOS7 from truncating the text when selecting an option on a html select element? iOS7 truncates the text on the options text instead of wrapping it. In my specific case this is totally unusable:

以上截图取自使用jQuery Mobile构建的html 5应用程序。我还应该提到这个问题在iOS6上不存在。

The above screenshot was taken from a html 5 app built with jQuery Mobile. I should also mention that this issue is not present on iOS6.

推荐答案

添加一个空的 optgroup code>在选择列表的末尾:

Add an empty optgroup at the end of the select list:

 <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>

这篇关于如何修复&lt; select&gt;中的截断文字元素在iOS7上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆