效果
代码
结构:
<table>
<thead>
<tr>
<th>姓名</th>
<th>电话</th>
<th>住址</th>
<th>操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
样式:
<style>
table {
width: 500px;
margin: 100px auto;
border-collapse: collapse;
text-align: center;
}
td,
th {
border: 1px solid #333;
}
thead tr {
height: 40px;
background-color: #ccc;
}
</style>
生成表格和删除: