I don’t think I’ve seen it before. CSS is at the presentation layer. If you need to limit the number of words, it’s better to use JS to process it. Of course this is just my understanding.
The lines of your code are to display ... after the multi-line text exceeds the limited width and height; As for limiting the number of words, using CSS can only control the width and height of the container, but it cannot be precise to how many words. character. Use JS to handle it.
I don’t think I’ve seen it before. CSS is at the presentation layer. If you need to limit the number of words, it’s better to use JS to process it. Of course this is just my understanding.
It’s better to use js
The lines of your code are to display
...
after the multi-line text exceeds the limited width and height;As for limiting the number of words, using CSS can only control the width and height of the container, but it cannot be precise to how many words. character.
Use JS to handle it.
You can’t directly limit the number of words. Clamp limits it to rows. The number of words is still controlled by js