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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 47 | HTML |
|
19년 전 | 4543 | |
| 46 | HTML |
|
19년 전 | 5406 | |
| 45 | HTML | 19년 전 | 3296 | ||
| 44 | HTML |
|
19년 전 | 4378 | |
| 43 | HTML | 19년 전 | 3792 | ||
| 42 | HTML |
|
19년 전 | 3770 | |
| 41 | HTML |
|
19년 전 | 4268 | |
| 40 | HTML |
세은아빠2
|
19년 전 | 3932 | |
| 39 | HTML | 19년 전 | 4283 | ||
| 38 | HTML |
|
20년 전 | 6042 | |
| 37 | HTML |
yesmoa
|
20년 전 | 6720 | |
| 36 | HTML | 20년 전 | 3829 | ||
| 35 | HTML | 20년 전 | 5033 | ||
| 34 | HTML | 20년 전 | 4506 | ||
| 33 | HTML | 20년 전 | 3737 | ||
| 32 | HTML | 20년 전 | 3827 | ||
| 31 | HTML | 20년 전 | 4582 | ||
| 30 | HTML |
|
20년 전 | 6664 | |
| 29 | HTML |
|
20년 전 | 8600 | |
| 28 | HTML | 20년 전 | 7231 | ||
| 27 | HTML | 20년 전 | 4087 | ||
| 26 | HTML | 20년 전 | 2568 | ||
| 25 | HTML | 20년 전 | 3075 | ||
| 24 | HTML | 20년 전 | 6833 | ||
| 23 | HTML | 21년 전 | 4902 | ||
| 22 | HTML | 21년 전 | 4840 | ||
| 21 | HTML | 21년 전 | 3694 | ||
| 20 | HTML | 21년 전 | 4830 | ||
| 19 | HTML | 21년 전 | 4721 | ||
| 18 | HTML |
prosper
|
21년 전 | 3561 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기