2.5.16
https://codesandbox.io/s/rl37koz6wo
Indented.vue页面中的属性文本内容有多个空格
连续的空格显示多个
连续的只显示了一个
你可能需要学习一下html和css的基础知识。MDN
normal
Sequences of whitespace are collapsed. Newline characters in the source are handled the same as other whitespace. Lines are broken as necessary to fill line boxes.
white-space: pre;
本来多个空格就只显示一个的。。。如果你要要显示多个,可以使用字符
为什么我就没有想到呢,感谢@troy351
你可能需要学习一下html和css的基础知识。MDN
normal
Sequences of whitespace are collapsed. Newline characters in the source are handled the same as other whitespace. Lines are broken as necessary to fill line boxes.white-space: pre;
再加上 white-space: pre-line;完美,万分感谢
建议这样用:
<span class="test" v-html="标 题"></span>
Most helpful comment
你可能需要学习一下html和css的基础知识。MDN