<!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>无标题文档</title>
<style>
table {
border-collapse:collapse; /* 关键属性:合并表格内外边框(其实表格边框有2px,外面1px,里面还有1px哦) */
border:solid #000000; /* 设置边框属性;样式(solid=实线)、颜色(#999=灰) */
border-width:2px 0 2px 0px; /* 设置边框状粗细:上 右 下 左 = 对应:1px 0 0 1px */
}
.left-1{
border:solid #000000;border-width:1px 1px 2px 0px;padding:2px;
font-weight:bolder;
}
.right-1{
border:solid #000000;border-width:1px 0px 2px 1px;padding:2px;
font-weight:bolder;
}
.mid-1{
border:solid #000000;border-width:1px 1px 2px 1px;padding:2px;
font-weight:bolder;
}
.left{
border:solid #000000;border-width:1px 1px 1px 0px;padding:2px;
}
.right{
border:solid #000000;border-width:1px 0px 1px 1px;padding:2px;
}
.mid{
border:solid #000000;border-width:1px 1px 1px 1px;padding:2px;
}
table caption {font-size:14px;font-weight:bolder;}
</style>
</head>
<body>
<table width="800" border="0">
<tr>
<td class="left-1">sdafdaf</td>
<td class="mid-1">dsfafdsa</td>
<td class="mid-1">dsfafdsa</td>
<td class="right-1">dsfafdsa</td>
</tr>
<tr>
<td class="left">dsaff</td>
<td class="mid">dsfaaf</td>
<td class="mid">dsfaaf</td>
<td class="right">dsfa</td>
</tr>
<tr>
<td class="left">dfsa</td>
<td class="mid">fdsaf</td>
<td class="mid">fdsaf</td>
<td class="right">dfsa</td>
</tr>
<tr>
<td class="left">dfsa</td>
<td class="mid">fdsaf</td>
<td class="mid">fdsaf</td>
<td class="right">dfsa</td>
</tr>
</table>
</body>
</html>
CSS制作三线表
最新推荐文章于 2022-07-28 21:24:11 发布