设置表格的布局算法:
table
{
table-layout:fixed;
}
table-layout属性为表设置表格布局算法。
| 默认值: | auto | 
|---|---|
| 继承: | no | 
| 版本: | CSS2 | 
| JavaScript 语法: | object.style.tableLayout="fixed" | 





所有主流浏览器都支持table-layout属性。
注意: IE7和更早的版本不支持"inherit"的值。IE8需要定义!DOCTYPE。IE9支持"inherit"。
| 值 | 描述 | 
|---|---|
| auto | 默认。列宽度由单元格内容设定。 | 
| fixed | 列宽由表格宽度和列宽度设定。 | 
| inherit | 规定应该从父元素继承 table-layout 属性的值。 | 
CSS 教程: CSS 表格
备案信息: 粤ICP备15087711号-2
Copyright © 2008-2025 啊嘎哇在线工具箱 All Rights.
本站所有资料来源于网络,版权归原作者所有,仅作学习交流使用,如不慎侵犯了您的权利,请联系我们。