【发布时间】:2010-08-12 01:10:54
【问题描述】:
我无法让
示例如下:
<button type="button" style="width:150px; word-wrap:break-word;">some very long text to make it wrap and go to another line</button>;
这个想法是有一个固定宽度的按钮,文本根据需要换行。在最新的 IE、FF 甚至桌面 Safari(Mac 和 PC)中,一切都按预期工作。按钮宽度固定,文字换行,按钮高度自动增加以显示换行。
在 iPhone/iPad 上,文本换行,但按钮高度没有增加。因此,用户无法看到所有文本。
有没有人知道如何在 iPhone/iPad 上像在桌面浏览器上一样工作,或者这是移动 Safari 的限制?
【问题讨论】:
-
<button type="button" style="width:150px; word-wrap:break-word; overflow:visible;">工作吗? -
我尝试添加溢出:可见,它没有任何区别。不过,谢谢你的想法。
标签: iphone ipad mobile-safari htmlbutton