CSS/HTML - 将长字符串包裹在文本区域内?
我可以在文本区域内创建一个字符串以换行吗? (为了避免水平滚动条)
请注意,我有一个非常长的字符串,没有任何空格(编码文本),并且 css 自动换行属性似乎不起作用......
can I make a string inside a textarea to wrap on multiple lines? (to avoid the horizontal scrollbar)
Note that I have a very long string without any spaces (a encoded text), and css word-wrap properties don't seem to work on it...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要的是默认值,并且应该正常工作,除非您指定了
wrap=on
或wrap=true
(不确定是哪个,但认为是第一个)属性!你需要强制它的是wrap=hard
但是,您可以使用单词中某处的
字符指定预定的断点。它不会是可见的,但会在那里中断。您还可以查看一些函数,例如 http://php.net/manual/ en/function.wordwrap.php
您还可以查看以下 css 设置:
What you want is default and should work properly unless you specified the
wrap=on
orwrap=true
(not sure which but think the first) attribute! what you need to force it iswrap=hard
you can however specify predetermined breaking points using the
character somewhere in the word. it won't be visible, but break there.you can also have a look a some function like http://php.net/manual/en/function.wordwrap.php
you can also have a look at the following css settings: