HTML中pre和textarea可以显示预格式化的文本。即保留空格和换行符。而不必添加和 等HTML元素来添加换行和打印空格。
pre去掉滚动条
pre显示文本内容时是不会自动换行的,此时可以添加一些CSS来解决:
ourjs this is very very very very very very very very very very very very very very very logn contents.
pre {
word-wrap: break-word;
Settings -> Editor -> General -> Use soft wraps in editor 选中换行反之不换行
(测试版本android studio 3.1.0版本,其他版本大家自适应)
补充知识:解决 android studio 一直闪
File > Invalidate Caches/Restart
重新启动
以上这篇Android studio 自动换行和取消自动换行操作就是小编分享给大家的全部内容了,希望能给大家一个参考,