我创建了可编辑DIV here。正如我想要的那样,文字正在包裹着。但是,我注意到,只有纯文本才能包装文本。在下面的图片上,我贴上了一些带有标记的文字 - 而且没有换行。我可以解决这个问题吗,所以DIV里的文字总是会换行?DIV文字不会总是包装
代码编辑DIV:
.editableDiv {
padding: 5px;
-webkit-user-modify: read-write;
-moz-user-modify: read-write;
user-modify: read-write;
word-wrap: break-word;
box-sizing: border-box;
background-color: #FAC28A;
color: #003399;
}
处于'pre'标签的文本?因为:http://stackoverflow.com/questions/248011/how-do-i-wrap-text-in-a-pre-tag?rq=1 –