包装多行的HTML输入按钮的文本价值 [英] Wrapping an HTML input button's text value over multiple lines

查看:173
本文介绍了包装多行的HTML输入按钮的文本价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何移动文本到一个新的行与HTML input元素的键入=按钮属性?

How do I move text to a new line in an HTML input element with the type="button" attribute?

我有以下code:

<input type="button" id="btnTexWrapped" value="I see this is a long sentence here." style="width: 200px;" />

我想被包裹在两行按钮的文本值。我试了一下输入到HTML中的下一行。如我所料没有工作:

I want the button's text value to be wrapped in two lines. I tried typing it into the next line in HTML. It didn't work as I expected:

<input type="button" id="btnTexWrapped" value="I see this is a long 
sentence here." style="width: 200px;" />

我使用的白色空间中的所有选项也试过固定宽度:200像素; ,但仍没有作品

我行与静态固定的长度,宽度,或其他值:为控制是不会改变的。

I am OK with statically fixing the length, width, or other values: as the control is not going to change.

推荐答案

试试这个,你可以看到它是如何工作的瞬间:

Try this, you can see how it works instantly:

<input type="button" value="Carriage&#13;&#10;return&#13;&#10;separators" style="text-align:center;">

这篇关于包装多行的HTML输入按钮的文本价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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