How can I show three dots(...) in a text like this?
Unicode includes ⠇ which is the Braille symbol for the letter "U". To use, just use the HTML entity ⠇ in your code.
To clip at the transition between characters you can specify text-overflow as an empty string, if that is supported in your target browsers: text-overflow: ''; . This keyword value will display an ellipsis ( '…' , U+2026 HORIZONTAL ELLIPSIS ) to represent clipped text.
Add all these. To make in single line.
text-overflow: ellipsis; white-space: nowrap; overflow: hidden; width:100px; // some width
To do in multi line which actually you asked.
#content{ overflow: hidden; width:100px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
working fiddle: https://jsfiddle.net/mishrarajesh/676jc7sa/
Please note that this multiline code is supported only in web-kit browsers for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With