在字符串中加入换行符 '\n', 在给子字符的父级div 加上 white-space: pre即可
<div>xxxxxx + '\n' + 'ssssssss'</div>
div {
width: 200px;
white-space: pre
}
<div>xxxxxx + '\n' + 'ssssssss'</div>
div {
width: 200px;
white-space: pre
}
本文标题:css设置任意字符处换行
本文链接:https://www.haomeiwen.com/subject/miuuxktx.html
网友评论