元問答欄目視頻美女
  1. 編程問答
  2. 答案列表

css 給table加內外邊框 防止重複

回答列表
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>菜鳥教程(runoob.com)</title>
<style>
table {
border-collapse:collapse;
}
table,td,th {
border:1px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<tr>
<td>peter</td>
<td>griffin</td>
</tr>
<tr>
<td>lois</td>
<td>griffin</td>
</tr>
</table>
<p><b>注意:</b>如果沒有指定!doctype border-collapse 屬性在 ie8 及更早 ie 版本中是不起作用的。</p>
</body>
</html>
猜你喜歡
相關推薦