table {
table-layout: auto; /* 自动调整列宽 */
padding: 0;
word-break: break-all;
border-collapse: collapse;
margin: 0.8em 0;
width: 100%; /* 表格宽度自适应 */
box-shadow: -1px 2px 5px 1px @primary-color;
}
table tr {
border: 1px solid #dfe2e5;
margin: 0;
padding: 0;
}
table tr:nth-child(2n), thead {
background-color: #f8f8f8;
}
table th {
font-weight: bold;
border: 1px solid #dfe2e5;
border-bottom: 0;
margin: 0;
padding: 6px 13px;
width: auto !important; /* 确保列宽自动调整 */
}
table td {
border: 1px solid #dfe2e5;
margin: 0;
padding: 6px 13px;
}
table th:first-child, table td:first-child {
margin-top: 0;
}
table th:last-child, table td:last-child {
margin-bottom: 0;
}