今天老师编写一段代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表格布局案例</title>
</head>
<body>
<table border="0" height="800" width="95" align="center">
<tr>
<td colspan="2" bgcolor="#f08080">
<h2 align="center">页面的头部<h2>
</td>
</tr>
<tr>
<td width="80" bgcolor="#add8e6">
<table width="100%">
<tr>
<td><h2 align="center">页面的主体<h2></td>
</tr>
</table>
</td>
<td width="20" bgcolor="#ffa07a">
<h2 align="center">广告</h2>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#90ee90">
<h2 align="center">页面的脚部</h2>
</td>
</table>
</body>
</html>
这代码不是我复制粘贴的T—T,如果哪里错了大家多多指教啊,初学者
这代码的结果是
接下来才是重点
我在复习资料的时候发现了<table>标签的两个属性rules和frame
然后我就在上面代码的<table>标签加入了元素rules="rows" frame="blow"
结果就把那白色的间隙消除了,当然我并不了解rules和frame的用法和意思,这
里算是瞎猫碰上了死耗子,就想请教下大家有没有什么更好的解决方法 -, -