|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 | + <title>Omifood Hero Section</title> |
| 8 | + <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 9 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
| 10 | + <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 11 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
| 12 | + <link |
| 13 | + href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&display=swap" |
| 14 | + rel="stylesheet" |
| 15 | + /> |
| 16 | + |
| 17 | + <style> |
| 18 | + * { |
| 19 | + margin: 0; |
| 20 | + padding: 0; |
| 21 | + box-sizing: border-box; |
| 22 | + } |
| 23 | + |
| 24 | + html { |
| 25 | + font-family: "Rubik", sans-serif; |
| 26 | + color: #343a40; |
| 27 | + line-height: 1; |
| 28 | + } |
| 29 | + |
| 30 | + .container { |
| 31 | + margin: 0 auto; |
| 32 | + width: 1200px; |
| 33 | + /* background-color: red; */ |
| 34 | + } |
| 35 | + |
| 36 | + .header-container { |
| 37 | + width: 1200px; |
| 38 | + position: absolute; |
| 39 | + left: 50%; |
| 40 | + top: 50%; |
| 41 | + |
| 42 | + transform: translate(-50%, -50%); |
| 43 | + |
| 44 | + /* text-align: center; */ |
| 45 | + } |
| 46 | + |
| 47 | + .header-container-inner { |
| 48 | + width: 50%; |
| 49 | + } |
| 50 | + |
| 51 | + header { |
| 52 | + color: #fff; |
| 53 | + /* background-color: deepskyblue; */ |
| 54 | + height: 100vh; |
| 55 | + position: relative; |
| 56 | + |
| 57 | + background-image: linear-gradient( |
| 58 | + rgba(34, 34, 34, 0.6), |
| 59 | + rgba(34, 34, 34, 0.6) |
| 60 | + ), |
| 61 | + url(hero.jpg); |
| 62 | + |
| 63 | + background-size: cover; |
| 64 | + } |
| 65 | + |
| 66 | + nav { |
| 67 | + font-size: 20px; |
| 68 | + font-weight: 700; |
| 69 | + display: flex; |
| 70 | + justify-content: space-between; |
| 71 | + /* background-color: green; */ |
| 72 | + padding-top: 32px; |
| 73 | + } |
| 74 | + |
| 75 | + h1 { |
| 76 | + font-size: 52px; |
| 77 | + margin-bottom: 32px; |
| 78 | + line-height: 1; |
| 79 | + } |
| 80 | + |
| 81 | + p { |
| 82 | + font-size: 20px; |
| 83 | + line-height: 1.6; |
| 84 | + margin-bottom: 48px; |
| 85 | + } |
| 86 | + |
| 87 | + h2 { |
| 88 | + font-size: 44px; |
| 89 | + margin-bottom: 48px; |
| 90 | + } |
| 91 | + |
| 92 | + section { |
| 93 | + padding: 96px; |
| 94 | + background-color: #f7f7f7; |
| 95 | + } |
| 96 | + |
| 97 | + .btn:link, |
| 98 | + .btn:visited { |
| 99 | + font-size: 20px; |
| 100 | + font-weight: 700; |
| 101 | + background-color: #e67e22; |
| 102 | + color: #fff; |
| 103 | + text-decoration: none; |
| 104 | + |
| 105 | + display: inline-block; |
| 106 | + padding: 16px 32px; |
| 107 | + border-radius: 9px; |
| 108 | + } |
| 109 | + </style> |
| 110 | + </head> |
| 111 | + |
| 112 | + <body> |
| 113 | + <header> |
| 114 | + <nav class="container"> |
| 115 | + <div>Logo</div> |
| 116 | + <div>NAVIGATION</div> |
| 117 | + </nav> |
| 118 | + <div class="header-container"> |
| 119 | + <div class="header-container-inner"> |
| 120 | + <h1>A healthy meal delivered to your door, every single day</h1> |
| 121 | + <p> |
| 122 | + The smart 365-days-per-year food subscription that will make you eat |
| 123 | + healthy again. Tailored to your personal tastes and nutritional |
| 124 | + needs. |
| 125 | + </p> |
| 126 | + <a href="#" class="btn">Start eating well</a> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </header> |
| 130 | + <section> |
| 131 | + <div class="container"> |
| 132 | + <h2>Some random title</h2> |
| 133 | + <p> |
| 134 | + Lorem ipsum dolor sit amet consectetur adipisicing elit. Quibusdam |
| 135 | + accusamus itaque eaque necessitatibus totam neque dolores! Quaerat |
| 136 | + nihil repellendus ab, tempora accusamus molestiae rerum dicta, |
| 137 | + praesentium dolor molestias saepe delectus. |
| 138 | + </p> |
| 139 | + </div> |
| 140 | + </section> |
| 141 | + </body> |
| 142 | +</html> |
0 commit comments