table-table-layout和border-collapse: collapse的用法
来源:互联网 发布:歌曲剪切合并软件 编辑:程序博客网 时间:2024/06/05 20:20
<html>
<head>
<style type="text/css">
table.one
{
table-layout: automatic
}
table.two
{
table-layout: fixed
}
</style>
</head>
<body>
<table class="one" border="1" width="100%">
<tr>
<td width="20%">1000000000000000000000000000</td>
<td width="40%">10000000</td>
<td width="40%">100</td>
</tr>
</table>
<br />
<table class="two" border="1" width="100%">
<tr>
<td width="20%">1000000000000000000000000000</td>
<td width="40%">10000000</td>
<td width="40%">100</td>
</tr>
</table>
</body>
<head>
<style type="text/css">
table.one
{
table-layout: automatic
}
table.two
{
table-layout: fixed
}
</style>
</head>
<body>
<table class="one" border="1" width="100%">
<tr>
<td width="20%">1000000000000000000000000000</td>
<td width="40%">10000000</td>
<td width="40%">100</td>
</tr>
</table>
<br />
<table class="two" border="1" width="100%">
<tr>
<td width="20%">1000000000000000000000000000</td>
<td width="40%">10000000</td>
<td width="40%">100</td>
</tr>
</table>
</body>
</html>
用table-layout:fixed之后,表格的列宽固定,内容不会挤动列宽,auto则会根据内容变动列宽
table
{
border-collapse:collapse;
}左边是加了border-collapse之后效果,会合并边框
阅读全文
0 0
- table-table-layout和border-collapse: collapse的用法
- Table的border-collapse属性
- table的border-collapse属性
- 记录 table 的 border-collapse
- css table-layout 、border-collapse属性
- 一个属性解决Table的边框问题(border-collapse )
- 避免table的border重叠变粗,只需要对table的css设定border-collapse:collapse; 可以解决
- table中设置border-collapse属性
- 在css中为table 添加border-collapse:collapse后表格单元格边界异常的解决办法
- 关于table边框,设置了border-collapse:collapse之后,各条边框是怎么合并的?
- border-collapse:collapse 的使用
- border-collapse 和border-spacing的关系
- border-collapse的作用
- Table 单元格重叠变粗 使用border-collapse:collapse; 可以解决
- border-collapse 和 border-spacing
- 合并表格的边框 border-collapse: collapse
- border-collapse:collapse;
- border-collapse:collapse;
- AOP快速入门案例(二)
- 广度/深度优先算法
- MLeaksFinder 自动内存泄漏检测工具
- 【笔记】深入理解 java 虚拟机---垃圾收集器
- 猜拳小游戏
- table-table-layout和border-collapse: collapse的用法
- Ubuntu安装桌面程序
- layUI中点击按钮选择图片(不自动上传),然后点击上传按钮,上传图片(可以上传多个文件)
- 数据结构实验之排序三:bucket sort
- Unity 扇形UI 360Canvas
- 五大常用算法之一:分治法
- dubbo注入service服务,运行加载报错:Error creating bean with name........
- 123
- Excel导出文件名乱码问题