用CSS样式截取字符串,多的用省略号表示_百度知道
最佳答案: overflow:hidden; text-overflow:ellipsis; white-space:nowrap; eg:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb...更多关于css截取一定数量的字符的问题>>
CSS截取字符串,多余文字省略号显示_百度知道
[专业]答案:使用text-overflow属性可实现css截取字符串功能。示例:#test{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:20px;}上面的样式会将id为...更多关于css截取一定数量的字符的问题>>