在HTML文档中,想写某一个很长的段落(p标签),没有<br>
换行的那种。由于IDE或者编辑器界面大小有限,一行写完太长,中间需要回车换一行。这时候浏览器显示的文档中就会出现一个空格。请问这个空格如何去除?谢谢。
编辑器里面是3行,实际上是一行打不下,按了回车变成了3行。
蓝色划线部分就是产生的空格。
划线部分的空格该如何去除呢?
高洛峰2017-04-17 14:25:42
Your question is clearly: How to set the editor to automatically wrap?
I don’t know what your editor is, but it is usually set in view and word wrap.
Try not to type newlines in the source code.
PHP中文网2017-04-17 14:25:42
The simplest way to remove spaces at both ends of a string is the Baidu trim() method
阿神2017-04-17 14:25:42
This space is generated by manually using the [Enter key] to break the line. . You need a code formatting plugin
迷茫2017-04-17 14:25:42
Look at "Talk about how to use CSS to process text formats" to teach you how to deal with line breaks, spaces and tabs