Я пытаюсь достичь двух целей:< /p>
- Я хотел бы добавить более толстую синюю рамку только в нижней части первой строки, обозначенной как заголовок в HTML. Пример:
Только строка заголовка
caption
Row header
Row header
Row header
test
test
test
test
test
test
- Другой элемент, который я пытаюсь достичь, - это только в тех случаях, когда таблица имеет столбец заголовка, а не столбец строку заголовка, чтобы добавить более толстую синюю рамку вверху первой строки. Пример того, чего я надеюсь достичь:
Только строка столбца
caption
Column header
test
test
Column header
test
test
Column header
test
test
Вот глобальный CSS, который я обновляю:
CSS:
table {
overflow-x:auto;
border-collapse: collapse;
margin: 1.5rem 0 2.5rem 0;
width: 100% !important;
caption-side: bottom;
border-color: transparent;
}
td {
text-align: left;
vertical-align: top;
padding: 10px 12px !important;
border-bottom: 0.1rem solid #8A959E;
vertical-align: text-top;
}
td ul li {
margin-bottom: 0 !important;
}
td ol li {
margin-bottom: 0 !important;
}
td ul li::marker {
font-size: 1.2rem !important;
color: #2d3b45 !important;
}
td ol li::marker {
font-size: 1rem !important;
color: #2d3b45 !important;
}
th {
border-bottom: 0.1rem solid #8A959E;
padding: 16px 12px !important;
vertical-align: text-top;
text-align: left;
font-weight: 800;
}
th[scope=col] {
border-bottom: 0.1rem solid #2774ae;
vertical-align: bottom;
padding: 16px 16px 8px 16px !important;
}
th:first-child {
border-bottom: 0.2rem solid #2774ae;
}
tbody tr:nth-child(even) {
background-color: #f4f4f4;
}
th:first-child, td:first-child {
padding-left: 1rem !important;
}
th:last-child, td:last-child {
padding-right: 1.5rem !important;
}
caption {
text-align: left;
margin: 0.5rem 0;
color: #595959;
font-style: italic;
padding: 0 15px !important;
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... m-headings