<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>第六章2</title>
<style type="text/css">
#data td{
width: 100px; /*单元格的宽及高*/
height: 50px;
background-color: rgb(238, 238, 238);
}
#data th{
padding: 5px; /*表头文字同单元格边框间的距离*/
background-color:rgb(161, 148, 131);
}
#data td:hover{
background-color: chocolate; /*设置将鼠标指针移到单元格上面时的样式*/
}
</style>
</head>
<body>
<table border="0" cellspacing="5" id="data"> <!-- border="1"代表边框粗细,cellspaci
HTML之表格制作2
于 2022-04-14 11:53:26 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)