practice_css01.html
2.85 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<style>
table {
border-collapse: collapse;
width: 100%;
}
/* 선택된 항목들에 1px 색상줄 표시 */
table, th, tr, td {
border: 1px solid black;
}
/* th 바탕색상, 글자색상 */
th {
background-color: green;
color:white;
}
/* th 왼쪽에 두꺼운 색깔 선 넣기 */
th {
border-left: 5px solid yellow;
}
/* th, td 텍스트 위치, 여백*/
th, td{
text-align: center;
padding: 8px;
}
/* 짝수번째 열에 색상 부여*/
tr:nth-child(even){
background-color: lightgray;
}
/* 열 마우스 위로 드랍시 색상*/
tr:hover {
background-color: gray;
}
</style>
</head>
<body>
<h2> Table_Example</h2>
<!-- html로 창을 넘어갈시 그 창만 자동스크롤-->
<div style="overflow-x:auto;">
<table>
<!-- 분류를 나타나는 행-->
<tr>
<th> Name </th>
<th> Number </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th> Points </th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
<th>Points</th>
</tr>
<!-- 1번째 열-->
<tr>
<td>SEO</td>
<td>1</td>
<td>30</td>
<td>40</td>
<td>50</td>
<td>60</td>
<td>70</td>
<td>80</td>
<td>90</td>
<td>100</td>
<td>50</td>
<td>30</td>
<td>20</td>
<td>10</td>
<td>50</td>
<td>60</td>
<td>30</td>
<td>10</td>
<td>20</td>
<td>20</td>
</tr>
<!-- 2번째 열-->
<tr>
<td>Park</td>
<td>2</td>
<td>60</td>
<td>30</td>
<td>80</td>
<td>90</td>
<td>100</td>
<td>20</td>
<td>10</td>
<td>20</td>
<td>50</td>
<td>100</td>
<td>60</td>
<td>70</td>
<td>60</td>
<td>80</td>
<td>90</td>
<td>40</td>
<td>50</td>
<td>40</td>
</tr>
<!-- 3번째 열 -->
<tr>
<td>Cho</td>
<td>3</td>
<td>80</td>
<td>20</td>
<td>30</td>
<td>10</td>
<td>20</td>
<td>40</td>
<td>50</td>
<td>60</td>
<td>50</td>
<td>60</td>
<td>80</td>
<td>100</td>
<td>20</td>
<td>30</td>
<td>60</td>
<td>70</td>
<td>80</td>
<td>50</td>
</tr>
</table>
</div>
</body>
</html>