Is there a method to determine the number of lines that text breaks into using the CSS property word-break: break-all
? For example, if I have a div like this:
<div>Sample text to check how many lines the text is broken into</div>
And the corresponding CSS is:
div {
width: 100px;
word-break: break-all;
}
When viewed in the browser, the text will appear as shown in the image below. How can I calculate the number of lines it has broken into from the original text?
Please provide guidance on achieving this.