테이블 정렬하기
.table {
width: 80%;
max-width: 800px;
margin: auto;
table-layout: fixed;
border-collapse: collapse;
}
td {
background-color: white;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
둥글게 깎기
thead:first-child tr:first-child th:first-child {
border-radius: 10px 0 0 0;
}
thead:first-child tr:first-child th:last-child {
border-radius: 0 10px 0 0;
}
tbody:last-child tr:last-child td:first-child {
border-radius: 0 0 0 10px;
}
tbody:last-child tr:last-child td:last-child {
border-radius: 0 0 10px 0;
}
둥글게 깎은 후 깔끔하게 선 정리하기
.table th {
border-top-style: none;
}
'프로그래밍언어 > HTML, CSS' 카테고리의 다른 글
[CSS] 추가 클래스 - Multiple Class (0) | 2023.03.22 |
---|---|
내 마음대로 적는 CSS - 2 : background 관련 CSS 총집합! (0) | 2023.03.16 |
내 마음대로 적는 CSS -1 : 의사요소, 의사클래스, box-sizing, margin, overflow (0) | 2023.03.16 |