<!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的css样式</title>
<style type="text/css">
table {
border: 1px solid #B1CDE3;
padding:0;
margin:0 auto;
border-collapse: collapse;
}
td {
border: 1px solid #B1CDE3;
background: #fff;
font-size:12px;
padding: 3px 3px 3px 8px;
color: #4f6b72;
}
</style>
</head>
<body>
<table width="453" height="118" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="4" rowspan="5">
<h2>table的css样式</h2>
<p>border-collapse: collapse; <br/>
属性作用:当两条线重叠时只显示一条线 </p></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>table的css样式</title>
<style type="text/css">
table {
border: 1px solid #B1CDE3;
padding:0;
margin:0 auto;
border-collapse: collapse;
}
td {
border: 1px solid #B1CDE3;
background: #fff;
font-size:12px;
padding: 3px 3px 3px 8px;
color: #4f6b72;
}
</style>
</head>
<body>
<table width="453" height="118" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="4" rowspan="5">
<h2>table的css样式</h2>
<p>border-collapse: collapse; <br/>
属性作用:当两条线重叠时只显示一条线 </p></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
具体的table td 样式可以在替换,主要说明border-collapse: collapse;样式
一点点经验分享。
转自:http://medicine.iteye.com/blog/588706