With css overflow: hidden
.
Clipping text to a DIV in CSS
-
24-06-2022 - |
Domanda
What's the best way to clip text to a DIV in CSS? For example, to clip the word 'TESTING' to the DIV as shown below. Currently, the text extends past the end of the DIV, despite the DIV height being less than the text height.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow