利用CSS控制表格外观

开发者在线 Builder.com.cn 更新时间:2007-03-09作者:builder.com.cn 来源:

<html>
<head><title>HTML Table</title></head>
<style type="text/css">
TABLE {
background: blue;
border-collapse: separate;
border-spacing: 10px;
border: 5px dashed black;
margin: 100px;
padding: 0px; }
TD, TH {
background: white;
border: outset 5pt;
horizontal-align: right;
padding: 15px; }
CAPTION {
background: orange;
border: ridge 5px blue;
border-top:
ridge 10px blue;
padding: 5px; }
</style><body>
<table summary="TechRepublic.com - Tables and CSS">
<caption>First Quarter Sales</caption>
<thead><tr>
<th abbr="salesperson" scope="col">Person</th>
<th abbr="sales" scope="col">Sales</th>
</tr></thead>
<tfoot><tr>
<td colspan="2">Let's sell, sell, sell!</td>
</tr></tfoot>
<tbody><tr>
<td>Mr. Smith</td>
<td>600.00</td>
</tr><tr>
<td>Mr. Jones</td>
<td>0000.00</td>
</tr><tr>
<td>Ms. Williams</td>
<td>0000.00</td>
</tr></tbody>
</table></body></html>

用户评论

  • 用户名
  • 评论内容