添加css:
.tableoverflow {
table-layout: fixed;
}
.tableoverflow tr td {
text-overflow: ellipsis; /* for IE */
-moz-text-overflow: ellipsis; /* for Firefox,mozilla */
overflow: hidden;
white-space: nowrap;
}
table:
<table id="listViewTable" width="965px" border="0" cellpadding="0" cellspacing="0" style="word-break:break-all;margin-top: 5px" class="tableoverflow">
在360浏览器时注意在table中width="965px"设置宽度一定要有,不能等加载时再重新设置!
本文介绍了一种使用CSS实现固定布局表格的方法,并详细说明了如何使表格单元格内容在溢出时进行省略显示,适用于不同浏览器环境,特别强调了在360浏览器中设置表格宽度的重要性。
2724

被折叠的 条评论
为什么被折叠?



