I was wandering, is there a way to check how many lines will a text in a <p>
tag occupy after beeng wrapped? I know the width & height of <div>
that contains this <p>
.
This question came up when I was trying to cut a text if it's more then 3 lines long, and make it expandable later. I know I can achieve this by cutting the text with fixed length (average symbol count in a line). But I was just wandering :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…