-
Notifications
You must be signed in to change notification settings - Fork 0
/
15_rem_em.html
86 lines (75 loc) · 1.82 KB
/
15_rem_em.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rem & Em</title>
<style>
html {
font-size: 90%;
}
/* #box1 {
font-size: 20px;
}
#box1 p {
/ new size for em compute. this is a bad practice /
font-size: 1.5em;
padding: 1em;
}
#box1 ul {
/ nested element do not have the same size. this is a bad practice *
font-size: 1.2em;
}*/
#box2 h3 {
font-size: 2.3rem;
}
#box2 p {
font-size: 2rem;
line-height: 1.7rem;
}
#box-3 > p:first-child {
font-size: 2em;
}
#box-3 > p.px {
font-size: 20px;
}
#box-3 > p.ex {
font-size: 1ex;
}
</style>
</head>
<body>
<div>
<img height="200" src="./images/unidades_medida_relativa.gif" alt="">
</div>
<p>Body Text M y x</p>
<!-- <div id="box1">
<h3>Box 1</h3>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Voluptatum temporibus unde deserunt natus dolorum adipisci in deleniti obcaecati perferendis rem.
</p>
<ul>
<li>1</li>
<li>
<ul>
<li>1</li>
<li>2</li>
</ul>
</li>
<li>3</li>
</ul>
</div> -->
<div id="box2">
<h3>Box 2</h3>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Voluptatum temporibus unde deserunt natus dolorum adipisci in deleniti obcaecati perferendis rem.
</p>
</div>
<div id="box-3">
<p>2 times the ancestor element</p>
<p class="em">Paragraph EM</p>
<p class="ex">Paragraph EX</p>
<p class="px">Paragraph PX</p>
</div>
</body>
</html>