表格样式

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Table Style</title>
<style>    

#browser{    

width:700px;    

margin:0 auto;    

border-collapse:collapse;    

font-family:Arial, Helvetica, sans-serif;    

text-align:center;    

}    

#browser th,td{    

border:1px solid #aaa;    

}    

#browser thead th{    

border-bottom:2px solid #3d580b;    

background-color:#8fc629;    

color:#fff;    

padding:10px 0px;    

}    

#browser th{    

background-color:#f2f4b9;    

}    

#browser th.title{    

background-color:#e3e685;    

}    

#browser tfoot td{    

border-width:0px;    

text-align:rightright;    

font-size:12px;    

color:#777;    

}    

#browser caption{    

font-weight:bold;    

padding:6px 0px;    

color:#3d580b;    

font-size:25px;    

}    

#xhtml th.title{    

background-color:#ffd56c;    

}    

#xhtml th{    

background-color:#ffe8ae;    

}    

</style>
</head>
<body>
<h1>Table Style</h1>
<hr />
<table id="browser">
  <caption>
  浏览器兼容性一览表
  </caption>
  <thead>
    <tr>
      <th>CSS特征</th>
      <th>MSIE 6.0 </th>
      <th>FF 1.0 </th>
      <th>FF 1.5 </th>
      <th>OP 8.5 </th>
    </tr>
  </thead>
  <tbody id="html">
    <tr>
      <th colspan="5" class="title">HTML 4.01</th>
    </tr>
    <tr>
      <th>a</th>
      <td>81%</td>
      <td>85%</td>
      <td>85%</td>
      <td>94%</td>
    </tr>
    <tr>
      <th>abbr</th>
      <td>N</td>
      <td>97%</td>
      <td>85%</td>
      <td>94%</td>
    </tr>
    <tr>
      <th>acronym</th>
      <td>94%</td>
      <td>97%</td>
      <td>97%</td>
      <td>75%</td>
    </tr>
  </tbody>
  <tbody id="xhtml">
    <tr>
      <th colspan="5" class="title">XHTML 1.0 changes
        </td>
    </tr>
    <tr>
      <th>HTML in XML </th>
      <td>N</td>
      <td>Y</td>
      <td>Y</td>
      <td>Y</td>
    </tr>
    <tr>
      <th>well-formed</th>
      <td>Y</td>
      <td>Y</td>
      <td>Y</td>
      <td>Y</td>
    </tr>
    <tr>
      <th>Media Types </th>
      <td>N</td>
      <td>Y</td>
      <td>Y</td>
      <td>Y</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="5">资料来源 HTTP://Rlog.Cn</td>
    </tr>
  </tfoot>
</table>
</body>
</html>

 

 主要代码:border-collapse:collapse;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值