You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.0 KiB

/* pages/table/table.wxss */
.table {
display: block;
width: 100%;
}
.table-row {
display: flex;
width: 100%;
border-bottom: 1px solid #ccc;
}
.table-cell {
display: flex; /* 启用Flex布局 */
flex: 1; /* 允许单元格伸缩以填满行 */
padding-top: 20rpx;
padding-bottom: 20rpx;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
border-right: 1rpx solid #ccc;
font-size: 25rpx;
}
.table-row .table-cell:nth-child(1) {
flex: 2; /* 第一列宽度比例为2 */
}
.table-row .table-cell:nth-child(2) {
flex: 1; /* 第二列宽度比例为1 */
}
.table-row .table-cell:nth-child(3) {
flex: 1; /* 第三列宽度比例为1 */
}
.table-row .table-cell:nth-child(4) {
flex: 1; /* 第四列宽度比例为1 */
}
.table-row .table-cell:nth-child(5) {
flex: 1; /* 第五列宽度比例为1 */
}
/* 移除最后一个单元格的右边边框 */
.table-row:last-child .table-cell {
border-bottom: none;
}
/* 移除最后一列的右边边框 */
.table-cell:last-child {
border-right: none;
}