JSFiddle - React, Tailwind, and code Playground
by lix__
HTML
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>FCC: Product Landing Page</title>
<link rel="stylesheet" href="styles.css">
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/0991185c0b.js" crossorigin="anonymous"></script>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap" rel="stylesheet">
</head>
<body>
<header id="header" class="sticky">
<a href="#"><img id="header-img" class="logo" src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" alt="logo"></a>
<nav id="nav-bar">
<ul>
<li><a class="nav-link" href="#features"></a>Features</li>
<li><a class="nav-link" href="#how-it-works"></a>How It Works</li>
<li><a class="nav-link" href="#pricing"></a>Pricing</li>
</ul>
</nav>
</header>
<main>
<aside>
<h2 id="title">Handcrafted, home-made masterpieces</h2>
<form id="form" action="https://www.freecodecamp.com/email-submit" method="post">
<input id="email" type="email" name="email" placeholder="Enter your email address" required><br>
<input id="submit" class="btn" type="submit" name="submit" value="Get started">
</form>
</aside>
<div id="features" class="features-section">
<item class="features-item">
<i class="fas fa-3x fa-fire icon"></i>
<h2 class="features-title">Premium Materials</h2>
<p class="features-p">Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</item>
<item class="features-item">
<i class="fas fa-3x fa-truck icon"></i>
<h2 class="features-title">Fast Shipping</h2>
<p class="features-p">We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if...
CSS
/* ----- RESET CSS ----- */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* ----- end reset css ----- */
/* -----RESET BOX-SIZING ----- */
* {
box-sizing: border-box;
}
/* --- MOBILE VERSION --- */
body {
font-family: 'Lato', sans-serif;
font-weight: 400;
background-color: #EEE;
text-align: center;
margin-top: 150px;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
height: 130px;
background-color: #EEE;
background-color: rgba(238, 238, 238, 0.9);
}
.logo {
width: 300px;
margin: 12px 0 5px;
}
li {
padding: 5px;
}
h2 {
font-weight: bold;
font-size: 1.5rem;
}
input[type=email] {
margin: 20px;
width: 270px;
padding: 5px;
font-size: 0.8rem;
border: solid thin black;
border-radius: 2px;
}
.btn {
background-color: #F1C40F;
text-transform: uppercase;
font-weight: bold;
font-size: 1rem;
padding: 5px 25px;
border: none;
border-radius: 2px;
}
.icon {
color: darkorange;
visibility:...