Striped Tables(스트라이프 테이블)
Striped Tables(스트라이프 테이블)
First Name Last Name Savings
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300
For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows:
Example
tr:nth-child(even) {background-color: #f2f2f2}
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
</style>
</head>
<body>
<h2>Striped Table</h2>
<p>For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows:</p>
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
<td>$100</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
<td>$150</td>
</tr>
<tr>
<td>Joe</td>
<td>Swanson</td>
<td>$300</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
<td>$250</td>
</tr>
</table>
</body>
</html>

게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 107 | HTML |
홀로남은자
|
19년 전 | 3336 | |
| 106 | HTML | 19년 전 | 3221 | ||
| 105 | HTML |
그레이스웹
|
19년 전 | 4951 | |
| 104 | HTML |
|
19년 전 | 6290 | |
| 103 | HTML |
|
19년 전 | 5268 | |
| 102 | HTML |
|
19년 전 | 4625 | |
| 101 | HTML |
|
19년 전 | 3438 | |
| 100 | HTML |
|
19년 전 | 6194 | |
| 99 | HTML |
|
19년 전 | 5026 | |
| 98 | HTML |
|
19년 전 | 3450 | |
| 97 | HTML |
|
19년 전 | 4441 | |
| 96 | HTML | 19년 전 | 6881 | ||
| 95 | HTML | 19년 전 | 4335 | ||
| 94 | HTML | 19년 전 | 3219 | ||
| 93 | HTML | 19년 전 | 5761 | ||
| 92 | HTML | 19년 전 | 4153 | ||
| 91 | HTML |
|
19년 전 | 5183 | |
| 90 | HTML |
|
19년 전 | 3243 | |
| 89 | HTML |
|
19년 전 | 3164 | |
| 88 | HTML |
|
19년 전 | 3631 | |
| 87 | HTML | 19년 전 | 5167 | ||
| 86 | HTML | 19년 전 | 4812 | ||
| 85 | HTML | 19년 전 | 4141 | ||
| 84 | HTML |
|
19년 전 | 3494 | |
| 83 | HTML |
|
19년 전 | 3154 | |
| 82 | HTML | 19년 전 | 4920 | ||
| 81 | HTML |
|
19년 전 | 4135 | |
| 80 | HTML | 19년 전 | 4459 | ||
| 79 | HTML | 19년 전 | 3585 | ||
| 78 | HTML |
|
19년 전 | 4924 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기