CSS3 表格布局 基本使用记录

CSS 样式

.table {
    display: table;
    border-collapse: collapse;
}
.row{
    display: table-row;
}
.col {
    display: table-cell;
    border: 1px solid blue;
    padding: 1em;
}

border-collapse: collapse; 用于共享边框线

简单用法

例子整体代码

表格布局


? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…
? navigation column content…
? news headlines column content…
? main article content…
? navigation column content…
? news headlines column content…
? main article content…
? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…
? navigation column content…
? news headlines column content…
? main article content…
? navigation column content…
? news headlines column content…
? main article content…
? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…
? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…
? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…
? navigation column content…asdadadasdasdasdasd
? news headlines column content…
? main article content…

效果图

CSS3 表格布局 基本使用记录_第1张图片
效果图预览

你可能感兴趣的:(CSS3 表格布局 基本使用记录)