-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAssignment4.html
103 lines (91 loc) · 1.99 KB
/
Assignment4.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Assignment 4</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<style>
body > section {
height: 100vh;
width: 100vw;
position: relative;
}
section > div {
position: sticky;
width: 100vw;
height: 10vh;
margin: 0 0 0 0;
top: 0px;
left: 0px;
z-index: 2;
}
div > h3 {
color: white;
font-size: 30px;
top: 15px;
left: 10px;
margin: 0 0 0 0;
position: absolute;
z-index: 3;
}
section:nth-child(1) > div {
background: rgba(245, 0, 0, 0.9);
}
section:nth-child(2) > div {
background: darkblue;
}
section:nth-child(3) > div {
background: #291e1e;
}
section:nth-child(4) > div {
background: #450b0b;
}
body > section:nth-child(2) {
background: cornflowerblue;
}
body > section:nth-child(3) {
background: #3c3131;
}
body > section:nth-child(4) {
background: red;
}
h1 {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
margin: 0 0 0 0;
font-size: 200px;
font-family: Bahnschrift;
font-weight: bolder;
}
</style>
</head>
<body>
<section>
<div>
<h3>Card 1</h3>
</div>
<h1>Hello</h1>
</section>
<section>
<div>
<h3>Card 2</h3>
</div>
<h1>How</h1>
</section>
<section>
<div>
<h3>Card 3</h3>
</div>
<h1>Are</h1>
</section>
<section>
<div>
<h3>Card 4</h3>
</div>
<h1>You...?</h1>
</section>
</body>
</html>