-
Notifications
You must be signed in to change notification settings - Fork 0
/
05-hero.html
147 lines (127 loc) · 3.54 KB
/
05-hero.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Omifood Hero Section</title>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-family: "Rubik", sans-serif;
color: #444;
}
.container {
margin: 0 auto;
width: 1200px;
}
header {
/* background-color: orangered; */
height: 100vh;
position: relative;
background-image: linear-gradient(
rgba(34, 34, 34, 0.6),
rgba(34, 34, 34, 0.6)
),
url(hero.jpg);
background-size: cover;
color: #fff;
}
nav {
font-size: 20px;
font-weight: 700;
display: flex;
justify-content: space-between;
padding-top: 32px;
/* background-image: linear-gradient(to right, red, blue); */
/* background-color: green; */
}
.header-container {
width: 1200px;
position: absolute;
/* In relation to PARENT size */
left: 50%;
top: 50%;
/* In relation to ELEMENT size */
transform: translate(-50%, -50%);
/* background-color: violet; */
/* text-align: center; */
}
.header-container-inner {
width: 50%;
/* background-color: blue; */
}
h1 {
font-size: 52px;
margin-bottom: 32px;
line-height: 1.05;
}
p {
font-size: 20px;
line-height: 1.6;
margin-bottom: 48px;
}
.btn:link,
.btn:visited {
font-size: 20px;
font-weight: 600;
background-color: #e67e22;
color: #fff;
text-decoration: none;
display: inline-block;
padding: 16px 32px;
border-radius: 9px;
}
h2 {
font-size: 44px;
margin-bottom: 48px;
}
section {
padding: 96px 0;
background-color: #f7f7f7;
}
</style>
</head>
<body>
<header>
<nav class="container">
<div>LOGO</div>
<div>NAVIGATION</div>
</nav>
<div class="header-container">
<div class="header-container-inner">
<h1>A healty meal delivered to your door, every single day</h1>
<p>
The smart 365-days-per-year food subscription that will make you eat
healty algain. Tailored to your personal tastes and nutritional
needs
</p>
<a href="#" class="btn">Start eating well</a>
</div>
</div>
</header>
<section>
<div class="container">
<h2>Some random heading</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque quas,
minus beatae sapiente debitis voluptatum, laudantium veritatis impedit
corrupti officia recusandae fugit, voluptates iure velit! Ad suscipit
vitae nobis optio. Lorem ipsum dolor sit, amet consectetur adipisicing
elit. Reiciendis sequi quam earum voluptas eum laboriosam at
cupiditate debitis in odio adipisci repudiandae enim ea, sint quos
similique! Debitis, facilis dolore?
</p>
</div>
</section>
</body>
</html>