IE10 text-overflow ellipsis not working

前端 未结 1 885
一向
一向 2020-12-22 03:58
1条回答
  •  爱一瞬间的悲伤
    2020-12-22 04:40

    First of all, div is a block level element and a is an inline level element, so you cannot use a div inside an anchor tag b...so you should use any other inline tag (like small , span etc)

    Secondly, if you have to use a div inside div, you can wrap your text in another tag like this ....

    text-overflow Attribute Sample

    Each box (div element) below contains the following text:

    and css of class textTrunc:

    .textTrunc{  
        overflow:hidden;  
        white-space: nowrap;  
        text-overflow: ellipsis;  
        display:block;  
    }
    

    0 讨论(0)
提交回复
热议问题