输入字段,换行文本而不是水平扩展 [英] Input Field, wrap text instead of extending horizontally
本文介绍了输入字段,换行文本而不是水平扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个输入字段,用户会在里面写文本,但是当文本是长的,它只是水平扩展,而不是垂直向下。
overflow:hidden;
word-wrap:break-word;
我没有运气。
我想你应该使用多行输入字段作为TextArea:http://htmlhelp.com/reference /html40/forms/textarea.html
示例代码:
< textarea rows =10cols =30>< / textarea>
I have an input field, a user will write text inside but when the text is to long it just extends horizontally instead of dropping down vertically.
I tried: overflow: hidden; word-wrap: break-word;
and I had no luck. Any other suggestions on how to accomplish this?
解决方案
I think you should use a multiline input field as TextArea:
http://htmlhelp.com/reference/html40/forms/textarea.html
Sample code:
<textarea rows="10" cols="30"></textarea>
这篇关于输入字段,换行文本而不是水平扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文