在css中设置样式就可以了,一行代码搞定:
white-space: pre-line;
例如
pre{
text-indent: .2rem;
color: #333;
font-size: .28rem;
white-space: pre-line;
}
在css中设置样式就可以了,一行代码搞定:
white-space: pre-line;
例如
pre{
text-indent: .2rem;
color: #333;
font-size: .28rem;
white-space: pre-line;
}