Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html>
  <head>
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
    <meta charset="utf-8">
    <meta name="author" content="CogentMedia">
    <meta name="viewport" content="width-device, initial-scale 1">
    <title>BarbersDream</title>
  </head>
  <body>
   <header id="header">
     <input id="menu" name="menu" role="menu" type="checkbox" tabindex="1">
     <label for="menu" class="menu-label">
       <div></div>
     </label>
     <nav id="nav-bar">
       <img id="header-img" src="https://image.freepik.com/free-vector/barber-pole-logo_1415-692.jpg" alt="Company Logo">
       <ul>
         <li><a href="#background-img" target="_self" class="nav-link">Home</a></li> 
         <li><a href="#about1" target="_self" class="nav-link">About</a></li>
         <li><a href="#support" target="_self" class="nav-link">Support</a></li>
       </ul>
     </nav>
   </header>
   <main>
     <section id="background-img">
       <h1 class="slogan"><strong>Great Shave, Perfection at its Finest. </strong></h1>
     </section>
     <section class="section">
      <h1 id="about1">Our Products</h1>
     </section>
     <section class="section1">
       <div id="card">
         <img src="https://cdn.shopify.com/s/files/1/0812/3241/products/DOV1065851_Fendrihan_Fleury_Cross_LE_Dovo_58_Cocobolo_x1024.jpeg?v=1556290979" alt="Barbers blade image" id="product-image">
         <p>Hand Crafted, High Quality Blade, with Ergonomic handle</p>
         <form action="https://www.google.com">
          <label for="button-purchase">
            <button id="button-purchase" name="Barber blade" role="Purchase">Purchase
          </label>
       </div>
       <div id="card">
         <img src="https://cdn.shopify.com/s/files/1/0812/3241/products/53-02_x1024.jpeg?v=1556245600" alt="Shaving cream image" id="product-image">
         <p>Improved Formula, Enhances your skin, Repairs Follicles.</p>
          <label for="button-purchase2">
            <button id="button-purchase" name="Barber cream" role="Purchase">Purchase
          </label>
       </div>
       <div id="card">
         <img src="https://images.squarespace-cdn.com/content/v1/5cbfbc083560c37b2a46d822/1586548333317-QA9FL8FBJFK7XWCWRWST/ke17ZwdGBToddI8pDm48kNiEM88mrzHRsd1mQ3bxVct7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0s0XaMNjCqAzRibjnE_wBlkZ2axuMlPfqFLWy-3Tjp4nKScCHg1XF4aLsQJlo6oYbA/BODYLOTION_500ml_GOED-1.jpg?format=1500w" alt="face lotion image" id="product-image">
         <p>Natural ingredients, Engineered with perfection in mind.</p>
          <label for="button-purchase3">
            <button id="button-purchase" name="face lotion" role="Purchase">Purchase
          </label>
         </form>
       </div>
    </section>
    <section id="about">
      <article>
        <iframe src="https://www.youtube.com/embed/FVas21XdCSs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" id="video" allowfullscreen></iframe>
        <p>Product Showcase</p>
      </article>
    </section>
     <h1 id="slogan" class="slogan"> Support</h1>
    <section id="support">
      <form action="https://www.freecodecamp.com/email-submit" id="form">
        <label for="name">
          <h2>Name</h2>
          <input id="name" name="name" role="textfield" placeholder="Enter your name" type="text">
        </label>
        <label for="email">
          <h2>Email</h2>
          <input id="email" name="email" role="textfield" placeholder="Enter your email" type="email">
        </label>
        <label for="tel">
          <h2>Phone</h2>
          <input id="tel" name="phonenumber" role="textfield" placeholder="Enter your phone number" type="tel">
        </label>
        <label for="submit">
        <input id="submit" name="submit" role="submit" type="submit">
        </label>
      </form>
      <img id="support-img" src="https://image.freepik.com/free-vector/barber-pole-logo_1415-692.jpg" alt="Company Logo">
    </section>
   </main>
   <footer>
   <h3 id="copyright">&copy; 2021 Cogent Media.</h3>
   </footer>
  </body>
</html>
              
            
!

CSS

              
                @font-face {
  font-family: 'Nova Slim';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/novaslim/v14/Z9XUDmZNQAuem8jyZcnOz8mJ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body {
display:flex;
justify-content: center;
flex-direction:column;
margin: 0px;
background-color: rgba(100,125,150,1);
/* background-color: rgba(100,125,150,1); */
}
#header {
position:fixed;
top: 0px;
width: 100%;
max-height:100px;
background: rgba(100,125,150,1);
z-index:999
}
#nav-bar {
display:flex;
justify-content: space-between;
}
#header-img {
height:100px;
}
ul {
display:flex;
flex-direction: row;
list-style: none;
}
li {
transform:translatey(35%);
}
.nav-link {
text-decoration: none;
Font-family: Nova Slim;
text-transform:uppercase;
font-weight: 600;
font-size: 1.5em;
margin: 0px 3em;
color: rgba(255,255,255,.7);
}
.nav-link:hover {
color: rgba(255,255,150,1);
transition-duration: 400ms;
}
#background-img {
background-size:cover;
background-blend-mode: multiply;
background-image: url(https://images.unsplash.com/photo-1585747860715-2ba37e788b70?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1653&q=80);
background-attachment: fixed;
margin: 0px;
text-align:center;
font-family: Nova Slim;
width:100%;
height:35em;
}
.slogan {
margin: 0px;
font-size: 5em;
text-align:center;
background-color: rgba(25,75,100,.2);
background-blend-mode:multiply;
color:rgba(255,255,235,1);
padding:2.9em 5em 2.9em 5em;
max-height:inherit;
animation-name: drop;
animation-duration: 3s;
animation-iteration-count: 1;
}
.section {
width:100%;
height:5em;
margin: 0px;
text-align: center;
font-family: Nova Slim;
font-size: 10em;
animation-name: gradient;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-direction:alternate;
}
.section1 {
background-color: rgba(250,250,250,1);
height: 600px;
display:flex;
width: 1500px;
align-items: center;
justify-content:space-evenly;
flex-direction: row;
margin:auto;
}
#card {
background-color: rgba(50,150,255,1);
width: 200px;
height: 300px;
border-radius: 5px;
border: rgba(50,150,255,.8) solid 2px;
box-shadow: 7px 4px 12px 3px rgba(0,0,0,0.3)
}
#product-image {
width:inherit;
height:inherit/2;
}
#button-purchase {
border-radius: 5px;
position: absolute;
margin:1em 4.7em 0em;
}
#button-purchase:hover {
background-color: rgba(50,150,255,1);
color: rgba(255,255,50,1);
transition-duration: 400ms;
}
article {
display:flex;
flex-direction: row;
justify-content: center;
font-family: sans-serif;
font-weight: 800;
font-size:5em;
height: 10em;
color:rgba(255,255,235,1);
margin:auto;
}
#video {
width:600px;
height:400px;
transform: translatex(203px);
margin: 0px 1em 0px 0px;
}
#support {
position:relative;
background-color: rgba(50,150,255,1);
background-size: cover;
display:flex;
justify-content:center;
width: 50%;
height: 40em;
margin:auto;
border-radius:10%;
overflow:hidden;
}
#form {
position:absolute;
top: 80px;
left: 100px;
}
#name,
#email,
#tel, 
#submit {
font-family: Nova Slim;
font-size:2em;
width: 12em; 
border-radius: 5px;
}
#submit {
transform:translatey(200%);
position:relative;
}
#submit:hover {
transform:translatey(200%);
background:rgba(0,0,0,0.1);
color: rgba(255,255,50,1);
transition-duration: 400ms;
}
#support-img {
position:absolute;
right: 50px;
top: 20px;
max-width: 500px;
border-radius:10%;
}
h1 {
margin: 0px;
padding-top: 1em;
font-weight: 800;
color:rgba(235,235,235,1);
}
p {
font-family: sans-serif;
font-size: 1em;
padding: 0em 2em 1em;
width: 17ch;
max-height: 2.5em;
overflow:hidden;
margin: 1em 0px;
}
h2 {
font-family: sans-serif;
font-weight:800;
font-size: 2em;
}
@keyframes gradient{
  0% {
  background: rgba(100,125,150,1);
  }
  100%{
  background: rgba(50,150,255,1);
  }
}
@keyframes drop {
  0% {
  opacity:0;
  transform: translatey(-10%);
  background-color: transparent;
  }
  50% {
  background-color: transparent;
  transform: translatey(0%)
  }
  100% {
  opacity: 1;  
  }
}
#menu,
label div {
display: none;
}
@media screen and (max-width:2100px) {
body {
display:flex;
justify-content: center;
flex-direction:column;
margin: 0px;
background-color: rgba(100,125,150,1);
/* background-color: rgba(100,125,150,1); */
}
#header {
position:fixed;
top: -1px;
width: 100%;
min-height:50px;
max-height:10vh;
background: rgba(100,125,150,1);
margin: 0px;
z-index:999
}
nav a {
opacity:0;
transition: 250ms ease-out;
  }
#menu:checked ~ nav a {
opacity:1;
transition: opacity 700ms ease-in 300ms;
  }
#menu:checked ~ nav {
float: right; 
max-width: 50vw;
min-width: 10vw;
height: 100vh;
display:flex;
justify-content:center;
flex-direction: column;
opacity:1;
transform:scale(1,1);
transition: 500ms ease-in-out;
  }
.menu-label {
position:absolute;
top: 0px;
left: 3em;
height: 100%;
display:flex;
align-items:center;
  }
.menu-label div,
.menu-label div::before,
.menu-label div::after {
display:block;
background: white;
height: 4px;
width: 2em;
border-radius: 2px;
position:relative;
}
.menu-label div {
transition:500ms ease-out 500ms;
  }
.menu-label div::before,
.menu-label div::after {
content: "";
position: absolute;
transition: 1s ease-out;
  }
.menu-label div::before {
bottom: 10px; 
transform-origin: right;
  }
.menu-label div::after {
top: 10px; 
left:0px;
  }
#menu:checked + label div {
background: rgba(100,125,150,1);
transition: 250ms ease-in;
}
#menu:checked + label div::before {
width:2em;
height:6px;
opacity:1;
background:black;
transform:rotate(-45deg);
transition: 400ms ease-in;
  }
#menu:checked + label div::after {
width:2em;
height:6px;
opacity:1;
background:black;
transform:rotate(45deg);
transition: 400ms ease-in;
top:0px;
left:5px;
  }
#nav-bar {
float: right; 
max-width: 50vw;
min-width: 10vw;
height: 100vh;
display:flex;
justify-content:center;
flex-direction: column;
transform:scale(0,1);
transform-origin: right;
transition: 500ms ease-in-out;
}
#header-img {
position: absolute;
top: 0px;
right:0px;
width:33vw;
height: 100vh;
}
ul {
display:flex;
flex-direction: column;
list-style: none;
}
.nav-link {
text-decoration: none;
Font-family: Nova Slim;
text-transform:uppercase;
font-weight: 600;
font-size: 1.5em;
margin: 2em 1em 2em .25em;
color: rgba(255,255,255,1);
display:flex;
}
.slogan {
background-color: rgba(25,75,100,.2);
background-blend-mode:multiply;
color:rgba(255,255,235,1);
font-size: 4vw;
padding: 0;
overflow: hidden;
color: white;
width:inherit;
height:560px;
display:flex;
justify-content: center;
text-align:center;
  }
strong {
position:absolute;
top: 250px;
  }
#slogan{
font-size: 10vw;
display:flex;
justify-content: center;
padding-top: 2em;
padding-bottom: 0em;
height: 3em;
margin-top:0px;
  }
.section{
width:100%;
height:5em;
margin: 0px;
text-align: center;
font-family: Nova Slim;
font-size: 10vw;
animation-name: gradient;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-direction:alternate;
  }
.section1 {
width:100%;
  }
#support {
position:relative;
background-color: rgba(50,150,255,1);
background-size: cover;
display:flex;
justify-content:center;
max-width: 350px;
height: 40em;
margin:auto;
border-radius:10%;
overflow:hidden;
}
#form {
position:absolute;
top: 80px;
left: 0px;
}
#name,
#email,
#tel, 
#submit {
font-family: Nova Slim;
font-size:2em;
width: 12em; 
border-radius: 5px;
}  
#submit {
position:absolute;
left:0px;
}
#support-img {
display:none;
  }
article {
display:flex;
flex-direction: row;
justify-content: space-between;
font-family: sans-serif;
font-weight: 800;
font-size:5vw;
height: 10em;
color:rgba(255,255,235,1);
margin:auto;
}
#video { 
width:100vw;
height:inherit;
transform:translatex(-0px);
margin-left: 0px;
}
footer{
display:flex;
justify-content:center;
align-items:center;
  }
}
@media screen and (max-width:800px) {
  .section1 {
background-color: rgba(250,250,250,1);
height: 600px;
display:flex;
width: 100%;
height:1200px;
align-items: center;
justify-content:space-evenly;
flex-direction: column;
margin:auto;
  }
  article p {
display: none;  
  }
  #video {
  width:100%;
  }
  #support {
min-width:192px;
  }
#name,
#email,
#tel, 
#submit {
font-family: Nova Slim;
font-size:1em;
width: 12em; 
border-radius: 5px;
}
}
              
            
!

JS

              
                  
              
            
!
999px

Console