Text-overflow CSS truncation

后端 未结 3 1659
执笔经年
执笔经年 2020-12-14 15:03

Earlier i was doing it dynamically using JS.. but we were getting some performance issues cuz of which we have to come with an alternative option.

I am now truncati

3条回答
  •  暖寄归人
    2020-12-14 15:45

    Works here:

    • http://jsfiddle.net/TReRs/4/

     .overme {
            width: 300px;
            overflow:hidden; 
            white-space:nowrap; 
            text-overflow: ellipsis;
            color: red;
        }
     
    how much wood can a woodchuck chuck if a woodchuck could chuck wood?

    Trailing dots/ellipsis are colored in red using that basic CSS.

提交回复
热议问题