【发布时间】:2012-10-14 10:49:13
【问题描述】:
如何将文本移动到具有type="button" 属性的 HTML 输入元素中的新行?
我有以下代码:
<input type="button" id="btnTexWrapped" value="I see this is a long sentence here." style="width: 200px;" />
我希望按钮的文本值包含在两行中。我尝试将它输入到 HTML 的下一行。它没有像我预期的那样工作:
<input type="button" id="btnTexWrapped" value="I see this is a long
sentence here." style="width: 200px;" />
我还尝试使用固定width: 200px; 的white-space 的所有选项,但仍然没有任何效果。
我可以静态地固定长度、宽度或其他值:因为控件不会改变。
【问题讨论】:
-
尝试使用
<button></button>标签。 -
当我尝试使用
标签: html button input word-wrap