<div style="width:30px;word-break:break-word">
some
</div>
<div>
</div>
<div style="width:10px;word-break:break-word">
words
</div>
<div style="width:50px;word-break:break-word">
wordswo大佬123words
</div>
There are some words in a div box styled width.
These words wraps by css word break rule.
Is there any way to convert them to a string split with \n or can we know a char in which line?
In the demo, the 'some' should be 'so\nme', the 'word' should be 'w\no\nr\nd\ns', the 'wordswowords' should be 'words\nwo大\n佬\n 123wo\nrds'
If all is english,it seems simple. But with Chinese, the result becomes difficult to understand.