website.css 1020 字节
Newer Older
片刻小哥哥's avatar
片刻小哥哥 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
table {
    width: 100%; /*表格宽度*/
    max-width: 65em; /*表格最大宽度,避免表格过宽*/
    border: 1px solid #dedede; /*表格外边框设置*/
    margin: 15px auto; /*外边距*/
    border-collapse: collapse; /*使用单一线条的边框*/
    empty-cells: show; /*单元格无内容依旧绘制边框*/
}
table th,
table td {
  height: 35px; /*统一每一行的默认高度*/
  border: 1px solid #dedede; /*内部边框样式*/
  padding: 0 10px; /*内边距*/
}

table th {
    font-weight: bold; /*加粗*/
    text-align: center !important; /*内容居中,加上 !important 避免被 Markdown 样式覆盖*/
    background: rgba(158,188,226,0.2); /*背景色*/
}

table tbody tr:nth-child(2n) {
    background: rgba(158,188,226,0.12); 
}

table tr:hover {
    background: #efefef; 
}

table th {
    white-space: nowrap; /*表头内容强制在一行显示*/
}

table td:nth-child(1) {
    white-space: nowrap; 
}

.table-area {
    overflow: auto;
}