首页 > 编程知识 正文

超出部分的用省略号怎么表示,文字过长显示省略号

时间:2023-05-03 13:20:46 阅读:117383 作者:1992

css实现单行溢出隐藏css代码

/*溢出隐藏*/overflow :隐藏; /*省略号*/text-overflow: ellipsis; /*无换行*/white-space: nowrap;

js实现多行溢出隐藏jsp页

dd class='user_star_dd'p你好,/p/dd

css代码

Overflow :隐藏; 高: 30px;

日本铁路代码

$($(function ) () /隐藏字符) ).user_star_DD ).each (function ) I ) ) vardivh=$(this ).height ); var$p=$('p ',$ ) ) $(this ); while($p.outerheight ) (divH ) ($p.text ) ).replace(/(s ) ) ([a-za-z0-9]|(w ) ) ) ) ) (; ); () )

特别的,在table中要用溢出省略,需要为table添加

style="table-layout: fixed;"(允许设置列宽,通过th) 默认为 table-layout: automatic 默认每一列列宽均分(不可设置列宽)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。