|
4 | 4 | <meta charset="UTF-8" />
|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 | 6 | <title>Omifood Hero Section</title>
|
7 |
| - <style></style> |
| 7 | + <link |
| 8 | + href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" |
| 9 | + rel="stylesheet" |
| 10 | + /> |
| 11 | + <style> |
| 12 | + * { |
| 13 | + padding: 0; |
| 14 | + margin: 0; |
| 15 | + box-sizing: border-box; |
| 16 | + } |
| 17 | + body { |
| 18 | + font-family: "Inter", sans-serif; |
| 19 | + } |
| 20 | + .container { |
| 21 | + margin: 0 auto; |
| 22 | + width: 1200px; |
| 23 | + } |
| 24 | + header { |
| 25 | + height: 100vh; |
| 26 | + position: relative; |
| 27 | + background-image: linear-gradient( |
| 28 | + rgba(34, 34, 34, 0.6), |
| 29 | + rgba(34, 34, 34, 0.6) |
| 30 | + ), |
| 31 | + url(hero.jpg); |
| 32 | + background-size: cover; |
| 33 | + color: #fff; |
| 34 | + } |
| 35 | + nav { |
| 36 | + font-size: 20px; |
| 37 | + font-weight: 700; |
| 38 | + display: flex; |
| 39 | + justify-content: space-between; |
| 40 | + text-transform: uppercase; |
| 41 | + padding-top: 32px; |
| 42 | + } |
| 43 | + .header-container { |
| 44 | + width: 1200px; |
| 45 | + position: absolute; |
| 46 | + top: 50%; |
| 47 | + left: 50%; |
| 48 | + transform: translate(-50%, -50%); |
| 49 | + } |
| 50 | + .header-container-inner { |
| 51 | + width: 50%; |
| 52 | + } |
| 53 | + h1 { |
| 54 | + font-size: 52px; |
| 55 | + margin-bottom: 32px; |
| 56 | + line-height: 1.05; |
| 57 | + } |
| 58 | + p { |
| 59 | + font-size: 20px; |
| 60 | + line-height: 1.6; |
| 61 | + margin-bottom: 48px; |
| 62 | + } |
| 63 | + .btn:link, |
| 64 | + .btn:visited { |
| 65 | + font-size: 20px; |
| 66 | + font-weight: 600; |
| 67 | + background-color: #e67e22; |
| 68 | + color: #fff; |
| 69 | + text-decoration: none; |
| 70 | + display: inline-block; |
| 71 | + padding: 16px 32px; |
| 72 | + border-radius: 10px; |
| 73 | + } |
| 74 | + h2 { |
| 75 | + font-size: 44px; |
| 76 | + margin-bottom: 48px; |
| 77 | + } |
| 78 | + section { |
| 79 | + padding: 96px 0; |
| 80 | + background-color: #f7f7f7; |
| 81 | + } |
| 82 | + </style> |
8 | 83 | </head>
|
9 | 84 | <body>
|
10 | 85 | <header>
|
11 |
| - <nav> |
| 86 | + <nav class="container"> |
12 | 87 | <div>Logo</div>
|
13 | 88 | <div>Navigation</div>
|
14 | 89 | </nav>
|
15 |
| - <div> |
16 |
| - <h1>A Healthy meal delivered to your door,every single day</h1> |
17 |
| - <p> |
18 |
| - The smart 365-days-per-year food subscription that will make you eat |
19 |
| - healthy again. Tailored to your personal tastes and nutritional needs. |
20 |
| - </p> |
21 |
| - <a href="#">Start eating well</a> |
| 90 | + <div class="header-container"> |
| 91 | + <div class="header-container-inner"> |
| 92 | + <h1>A Healthy meal delivered to your door,every single day</h1> |
| 93 | + <p> |
| 94 | + The smart 365-days-per-year food subscription that will make you eat |
| 95 | + healthy again. Tailored to your personal tastes and nutritional |
| 96 | + needs. |
| 97 | + </p> |
| 98 | + <a href="#" class="btn">Start eating well</a> |
| 99 | + </div> |
22 | 100 | </div>
|
23 | 101 | </header>
|
24 | 102 | <section>
|
25 |
| - <div> |
| 103 | + <div class="container"> |
26 | 104 | <h2>Some random heading</h2>
|
27 | 105 | <p>
|
28 | 106 | Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
|
0 commit comments