当文字超出DIV宽度时,超出的文字部分省略,并用显示省略号代替,css代码如下:

div.ellipsis {
    padding-left: 5px;
    text-align: left;
    text-overflow:ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

重要前提是DIV为固定宽度。
<end>

 

相关文章:

  • 2021-12-12
  • 2022-01-14
  • 2021-07-14
  • 2022-01-13
  • 2021-11-26
  • 2021-12-25
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2021-12-12
  • 2021-12-20
  • 2021-07-26
  • 2021-04-02
  • 2021-04-02
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案