cp from : https://blog.csdn.net/bsh_csn/article/details/51829103 html的table表格中td长度固定,当内容过长时,超过部分用省略号代替. 具体代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> &
代码如下: <div style="width:100px;height:20px;text-overflow:ellipsis; white-space:nowrap; overflow:hidden; ">a b c d e f g h i j k l , msa sd sd sa w df f </div> text-overflow属性仅是注解,当文本溢出时是否显示省略标记.并不具备其它的样式属性定义.我们想要实现溢出时产生省略号的效果.还必须定义:强制