| 提示:下面提供多种方法,解决的是有连续字母或数字撑大表格的问题。 |
方 法 1 :
固定表格大小
<table style="table-layout:fixed;word-break:break-all">
解决的是有连续字母或数字撑大表格的问题。
.gudingCopy {
table-layout:fixed;
word-wrap:break-word;
word-break:break-all;
}
固定表格宽度为720
方 法 2 :
<table width="720" style="TABLE-LAYOUT: fixed" >
高度不限制,若写上hight的
<table style="TABLE-LAYOUT: fixed" width="800" border="0" cellspacing="0" cellpadding="7" bgcolor="#f7f7f7">
<tr>
<td style="LEFT: 0px; WIDTH: 800px; WORD-WRAP: break-word"><font color="#990000">[效果]</font><br>
连串英文省略
</font>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</td>
</tr>
</table>
方 法 3 :
在<head>中,建立样式:
.auto {overflow: auto; height: 100px; width: 200px; clip: rect( ); padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px}
在td标签中加入:
<div class="auto" align="left">你的文字<div>
至此你就可以完成这个实例了,快去试试吧!
更多的固定表格大小[多种方法]请到论坛查看: http://BBS.TC711.COM
【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】
来源:
互联网
日期:2009-6-14