-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboxModel.html
More file actions
75 lines (66 loc) · 1.59 KB
/
Copy pathboxModel.html
File metadata and controls
75 lines (66 loc) · 1.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Box Model</title>
<style>
body{
background-color: azure;
}
*{
margin: 0px;
padding: 0px;
}
.boxModel{
background-color: turquoise;
margin: 10px;
border: 3px solid black;
padding: 10px;
}
.box{
height: 100px;
width: 200px;
border: 2px solid black;
}
.box1{
background-color: red;
position: relative;
margin: 10px;
box-sizing: border-box;
}
.box1::before{
content: "Box A";
}
.box2::before{
content: "Box B";
}
.box3::before{
content: "Box C";
}
.box2{
background-color: green;
margin-left: 33%;
box-sizing: content-box;
position: relative;
}
.box3{
background-color: blue;
margin-left: 66%;
box-sizing: content-box;
position: relative;
}
</style>
</head>
<body>
<header></header>
<main>
<section class="boxModel">
<div class="box box1"></div>
<div class="box box2"></div>
<div class="box box3"></div>
</section>
</main>
<footer></footer>
</body>
</html>