可以将样式修改如下:
#header {
background-color: #00BFFF;
color: white;
text-align: center;
padding: 10px 0; /* 减少上下边距 */
width: 100%;
}
#content {
width: 80%;
margin-top: 20px; /* 增加上边距 */
}
table {
border-collapse: collapse;
width: 100%;
border-radius: 5px; /* 添加圆角 */
}
th, td {
text-align: center;
padding: 8px;
border: 1px solid #ddd;
}
/* 修改表格列表的间距 */
tbody tr:not(:last-child) {
margin-bottom :10px;
}
这样就可以让标题与表格之间的距离更小,为表格添加圆角,并使表格列表的间距更小了。