什么css样式能自动截取一定长度的字符串,后面用...表示,最重要是兼容所有浏览器,不能用js,谢谢

html-css014

什么css样式能自动截取一定长度的字符串,后面用...表示,最重要是兼容所有浏览器,不能用js,谢谢,第1张

如果是在table标签中

table 设置 style=”table-layout: fixed”

并且在 td标签中使用

style= “white-space:nowrapoverflow:hiddentext-overflow: ellipsis”

其他标签

你试试 加入样式

width:150pxwhite-space:nowraptext-overflow:ellipsisoverflow: hidden

给td 定义一个class或id来进行编辑<style>属性!IE兼容的话在<style>属性/(css中) *,body{padding:0margin:0}这样定义就可以的,然后自己调一调就没问题了!