1,表格的常用属性
| 边距属性 | padding(margin无效) |
|---|---|
| 边框属性 | border |
| 尺寸 | width height |
| – | – |
| 文本格式 | font text line-height |
| 背景,颜色,图片,渐变 | background |
| 指定单元格数据的垂直对齐方式 | vertical-align:middle/top/bottom; |
| – | – |
2,表格特有属性
1,边框合并
border-collapse:collapse;合并
border-collapse:separate;分离
2,边框的边距(td的margin无效)
border-collapse:separate;必修是分离状态
border-spacing:20px 20px;水平,垂直
3,标题位置
caption-side:bottom;
4,显示规则
table-layout:auto;自动布局
table-layout:fixed;按照表格大小布局