在线预览地址
table.gif
源码:
/*---html---*/
<div class="form_data">
<div class="tab_tit">
<table>
<colgroup>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr class="tr-tit">
<th title="书名"><span>书名</span></th>
<th title="ISBN"><span>ISBN</span></th>
<th title="作者"><span>作者</span></th>
<th title="出版社"><span>出版社</span></th>
<th title="版次"><span>版次</span></th>
<th title="出版日期"><span>出版日期</span></th>
<th title="定价"><span>定价</span></th>
</tr>
</thead>
</table>
</div>
<div class="tab_tb">
<table>
<colgroup>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
<tr>
<td title="我只想一个人住在你心里"><span>我只想一个人住在你心里</span></td>
<td title="9787112157709"><span>9787112157709</span></td>
<td title="田纪春 等"><span>田纪春 等</span></td>
<td title="中国建筑工业出版社"><span>中国建筑工业出版社</span></td>
<td title="311"><span>311</span></td>
<td title="2016-03"><span>2016-03</span></td>
<td title="220.0"><span>220.0</span></td>
</tr>
</tbody>
</table>
</div>
</div>
/*---scss---*/
* {
box-sizing: border-box;
}
$ff_ms: "Microsoft Yahei";
$bgc_ff: #fff;
$bdc_db: #dbdbdb;
.text-overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
body {
margin: 0;
}
.form_data {
width: 80%;
margin: 100px auto;
background-color: $bgc_ff;
}
table {
width: 100%;
min-width: 100%;
font-size: 12px;
table-layout: fixed;
border-spacing: 0;
border-collapse: collapse;
}
/* -------- user-style -------- */
.tab_tb {
max-height: 240px;
}
.tab_tit,
.tab_tb {
padding: 0 10px;
overflow: hidden;
overflow-y: scroll;
col:nth-type(1) {
width: 250px;
}
}
tr {
border-bottom: 1px solid $bdc_db;
}
th,
td {
text-align: center;
padding: 16px 8px;
word-break: break-all;
span {
display: block;
@extend .text-overflow;
}
}
网友评论