Text overflow ellipsis not showing with some custom font

前端 未结 7 876
傲寒
傲寒 2021-01-17 09:08

I\'m currently trying to make a text box with hiding overflowing text. It works fine, but for some part. I\'m using

text-overflow: ellipsis;
<
7条回答
  •  春和景丽
    2021-01-17 09:39

    Instead of "ellipsis", you can actually specify your own set of characters to signify text overflowing.

    If your custom font has the period defined, you should be able to just use three periods like this:

    text-overflow: '...';
    

    Here's a JSFiddle of it in action: http://jsfiddle.net/x5e6yv21/

提交回复
热议问题