在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;
}