-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6.css_basic.html
More file actions
69 lines (65 loc) · 2.23 KB
/
Copy path6.css_basic.html
File metadata and controls
69 lines (65 loc) · 2.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css basic</title>
<style>
.italic{
font-style: italic;
color: red;
}
.bigtext{
font-size: 24px;
}
.smalltext{
font-size: 10px;
}
</style>
</head>
<body>
<h2>중첩 클래스 선택자 적용</h2>
<p class="italic bigtext">중첩클래스 : italic, bigtext 동시적용</p>
<p class="italic smalltext">중첩클래스 : italic, smalltext 동시적용</p>
<h2>글꼴의 상대크기</h2>
<!-- em : 부모요소에 대해 배수, %:부모요소에 대해 퍼센트 -->
<p>부모 글꼴의 본래크기</p>
<p style="font-size: 1.5em;">부모 글꼴의 1.5배크기</p>
<div style="font-size: 20px;">
부모텍스트
<p style="font-size: 1.5em;">자식텍스트</p>
</div>
<p style="font-size: 150%;">부모 글꼴의 150%크기</p>
<!-- 디스플레이의 높이에 대한 비율 : vh -->
<!-- 5vh는 높이에 대해 5%를 의미 -->
<p style="font-size: 5vh;">높이에 대한 상대크기;</p>
<!-- 디스플레이의 너비에 대한 비율 : vw -->
<!-- 5vh는 높이에 대해 5%를 의미 -->
<p style="font-size: 5vw;">너비에 대한 상대크기</p>
<h2>margin, border, padding</h2>
<!-- 전체요소를 가운데 정렬 시키기 위한 목적으로 margin:autho를 많이 사용 -->
<div style="border: 5px solid black; width: 400px; height: 200px; margin :auto; text-align: center; place-content: center;">
margin, border, padding 실습
</div>
<br>
<table border="1" style="border-collapse: collapse; width: 400px; height: 200px; text-align: center; margin: auto;">
<caption>테이블</caption>
<thead>
<tr>
<th>컬럼1</th>
<th>컬럼2</th>
</tr>
</thead>
<tbody>
<tr>
<td>data1</td>
<td>data2</td>
</tr>
<tr>
<td>data3</td>
<td>data4</td>
</tr>
</tbody>
</table>
</body>
</html>