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 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>Original Trombones</title>
    <script
      src="https://kit.fontawesome.com/f24e6187ab.js"
      crossorigin="anonymous"
    ></script>
    <link rel="stylesheet" href="css/normalize.css" />
    <link rel="stylesheet" href="css/style.css" />
  </head>
  <body>
    <header id="header">
      <a href="#">
        <img
          src="assets/product-landing-page-logo.png"
          alt="Original Trombones logo"
          id="header-img"
        />
      </a>
      <nav id="nav-bar">
        <ul>
          <li>
            <a class="nav-link" href="#features">Features</a>
          </li>
          <li>
            <a class="nav-link" href="#how-it-works">How it works</a>
          </li>
          <li>
            <a class="nav-link" href="#pricing">Pricing</a>
          </li>
        </ul>
      </nav>
    </header>

    <main>
      <div class="header-info">
        <h1>Handcrafted, home-made <strong>masterpieces</strong></h1>

        <form
          action="https://www.freecodecamp.com/email-submit"
          id="form"
          target="_blank"
          class="email-inp"
        >
          <input
            type="email"
            id="email"
            placeholder="Enter your email here..."
            required
            name="email"
          /><br />
          <input type="submit" id="submit" value="GET STARTED" /><br />
        </form>
      </div>
      <div class="trombone-info" id="features">
        <div class="info-container premium-materials-container">
          <i id="fire-icon" class="icon fa-solid fa-fire-flame-curved"></i>
          <div class="pm-text">
            <h2>Premium Materials</h2>
            <p>
              Our trombones use the shiniest brass which is sourced locally.
              This will increase the longevity of your purchase.
            </p>
          </div>
        </div>
        <div class="info-container fast-shipping-container">
          <i id="truck-icon" class="icon fa-solid fa-truck-fast"></i>
          <div class="fsc-text">
            <h2>Fast Shipping</h2>
            <p>
              We make sure you recieve your trombone as soon as we have finished
              making it. We also provide free returns if you are not satisfied.
            </p>
          </div>
        </div>
        <div class="info-container quality-assurance-container">
          <i id="battery-icon" class="icon fa-solid fa-battery-full"></i>
          <div class="qac-text">
            <h2>Quality Assurance</h2>
            <p>
              For every purchase you make, we will ensure there are no damages
              or faults and we will check and test the pitch of your instrument.
            </p>
          </div>
        </div>
      </div>

      <iframe
        id="video"
        src="https://www.youtube-nocookie.com/embed/y8Yv4pnO7qc?rel=0&controls=0&showinfo=0"
        allowfullscreen=""
        height="315"
        frameborder="0"
      ></iframe>

      <div id="how-it-works"></div>
      <div class="pricing-wrapper" id="pricing">
        <div class="trombone tenor-trombone">
          <h3>TENOR TROMBONE</h3>
          <h4>$600</h4>
          <p>Lorem, ipsum dolor.</p>
          <p>Lorem, ipsum.</p>
          <p>Lorem, ipsum dolor.</p>
          <p>Lorem, ipsum.</p>
          <button><a href="#">SELECT</a></button>
        </div>
        <div class="trombone bass-trombone">
          <h3>BASS TROMBONE</h3>
          <h4>$900</h4>
          <p>Lorem, ipsum.</p>
          <p>Lorem, ipsum dolor.</p>
          <p>Lorem, ipsum.</p>
          <p>Lorem, ipsum dolor.</p>
          <button><a href="#">SELECT</a></button>
        </div>
        <div class="trombone valve-trombone">
          <h3>VALVE TROMBONE</h3>
          <h4>$1200</h4>
          <p>Plays similar to a Trumpet</p>
          <p>Great for Jazz Bands</p>
          <p>Lorem, ipsum dolor.</p>
          <p>Lorem, ipsum.</p>
          <button><a href="#">SELECT</a></button>
        </div>
      </div>
    </main>

    <footer>
      <div class="footer-links-container">
        <ul>
          <li><a href="#">Privacy</a></li>
          <li><a href="#">Terms</a></li>
          <li><a href="#">Contact</a></li>
        </ul>
      </div>
      <p>Copyright 2016, Original Trombones</p>
    </footer>
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  </body>
</html>

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,400;0,600;0,800;1,200;1,400;1,600;1,800&display=swap");
body {
  font-family: "Montserrat", sans-serif;
  background-color: #fffdec;
  color: #444;
}

main {
  margin-top: 120px;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
}

/* header */
header {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  top: 0;
  width: 100%;
  background-color: #fcf6d4;
  /* box-shadow: 3px 3px 5px #d3cfbdc4; */
  z-index: 99;
}

img,
nav {
  margin-block: 0.3em;
}

#header-img {
  width: 300px;
  height: 34.15px;
  transition: transform 400ms;
  margin-top: 9px;
}

#header-img:hover {
  transform: scale(112%);
}

nav > ul > li {
  list-style-type: none;
  display: inline-block;
  margin-inline: 1em;
  padding: 0.5em 1em;
  background-color: #a09be7;
  text-align: center;
  border-radius: 999px;
  border: 2px solid #b9b5e7;
  transition: color 400ms;

  transition: background-color 200ms, transform 200ms, box-shadow 200ms,
    background-color 400ms;
}

:link {
  color: white;
  text-decoration: none;
  font-weight: 400;
}

:visited {
  color: #faf7e4;
}

nav > ul > li:hover {
  background-color: #8279e7;
  border-color: #a09be7;
  transform: scale(110%);
  box-shadow: 2px 2px 10px #6f6c8ac3;
}

/* header and email input */
.header-info {
  padding-block: 10em;
  margin-bottom: 2em;
  background-image: linear-gradient(
    180deg,
    hsl(51deg 87% 91%) 2%,
    rgb(230, 209, 179) 37%,
    rgb(224, 182, 153) 86%
  );
  position: relative;
  top: -3em;
}

h1 {
  text-align: center;
  margin-block: 30px;
}

strong {
  background-image: linear-gradient(
    90deg,
    hsl(226deg 91% 62%) 0%,
    hsl(237deg 77% 71%) 50%,
    hsl(244deg 61% 76%) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}

.email-inp {
  display: flex;
  flex-direction: column;
  width: 50%;
  margin: auto;
  justify-items: center;
  align-items: center;
}

#email {
  width: 60%;
  margin-bottom: 1em;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  border: none;
  box-shadow: 1px 1px 3px #300f0fad;
  transition: background-color 200ms, border-color 200ms, transform 200ms,
    box-shadow 200ms;
  min-width: 300px;
}

#submit {
  width: 35%;
  background-image: linear-gradient(
    90deg,
    hsl(226deg 91% 62%) 0%,
    hsl(237deg 77% 71%) 50%,
    hsl(244deg 61% 76%) 100%
  );
  color: white;
  border: none;
  border-radius: 999px;
  padding: 5px 20px;
  transition: transform 300ms, box-shadow 300ms;
  box-shadow: 1px 1px 3px #300f0fad;
  min-width: 200px;
}

#email:hover,
#email:focus {
  background-color: #bdccfda4;
  border-color: #446df6;
  transform: scale(113%);
  box-shadow: 3px 3px 10px #6f6c8ac3;
}

#submit:hover,
#submit:focus {
  transform: scale(120%);
  box-shadow: 2px 2px 10px #300f0fad;
}

/* Premium Materials, Fast Shipping, and Quality Assurance */
.trombone-info {
  display: flex;
  flex-direction: column;
  padding: 2em auto;
  margin-inline: 3em;
  justify-items: center;
}

.fa-solid {
  margin-inline: 3rem;
  font-size: 45px;
}

.info-container {
  display: flex;
  transition: transform 300ms;
}

.fa-fire-flame-curved {
  position: relative;
  left: 13px;
  margin-right: 1.53em;
}

.icon {
  align-self: center;
}

.pm-text h2,
.fsc-text h2,
.qac-text h2 {
  font-weight: 600;
  margin-bottom: -5px;
}

.premium-materials-container:hover {
  background-image: linear-gradient(
    70deg,
    hsl(0deg 81% 62%) 0%,
    hsl(15deg 87% 67%) 70%,
    #f8b181 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  transform: scale(110%);
}

.fast-shipping-container:hover {
  background-image: linear-gradient(
    270deg,
    hsl(244deg 61% 76%) 2%,
    hsl(237deg 77% 71%) 37%,
    hsl(226deg 91% 62%) 86%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  transform: scale(110%);
}

.quality-assurance-container:hover {
  background-image: linear-gradient(
    90deg,
    hsl(101deg 55% 42%) 2%,
    rgb(127, 177, 29) 37%,
    rgb(162, 177, 5) 86%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  transform: scale(110%);
}

#fire-icon {
  animation-name: heart-beat;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  background-image: linear-gradient(
    70deg,
    hsl(0deg 81% 62%) 0%,
    hsl(15deg 87% 67%) 70%,
    hsl(24deg 90% 74%) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}

@keyframes heart-beat {
  0% {
    opacity: 0.85;
    transform: scale(94%);
  }

  50% {
    opacity: 1;
    transform: scale(106%);
  }

  100% {
    opacity: 0.85;
    transform: scale(94%);
  }
}

#truck-icon {
  position: relative;
  animation-name: truck-anim;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  background-image: linear-gradient(
    270deg,
    hsl(244deg 61% 76%) 2%,
    hsl(237deg 77% 71%) 37%,
    hsl(226deg 91% 62%) 86%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}

@keyframes truck-anim {
  0% {
    transform: translateX(-7px);
    opacity: 0.8;
  }
  50% {
    transform: translateX(7px);
    opacity: 1;
  }
  100% {
    transform: translateX(-7px);
    opacity: 0.8;
  }
}

#battery-icon {
  animation-name: battery-pulse;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}

@keyframes battery-pulse {
  0% {
    background-color: hsl(101deg 55% 42%);
    transform: scaleX(95%);
  }
  50% {
    background-color: rgb(127, 177, 29);
    transform: scaleX(105%);
  }
  100% {
    background-color: hsl(101deg 55% 42%);
    transform: scaleX(95%);
  }
}

/* iframe */
iframe {
  display: block;
  width: 80%;
  max-height: 800px;
  min-height: 500px;
  margin: 5em auto 2em;
  max-width: 900px;
}

/* pricing options */
.pricing-wrapper {
  display: flex;
  margin: 5em auto;
  justify-content: space-evenly;
}

.trombone {
  text-align: center;
  width: 30%;
  border: 1px solid black;
  padding-block: 0 1em;
  border-radius: 28px;
  transition: transform 250ms, box-shadow 250ms;
}

.tenor-trombone {
  border: 2px solid #f2735c;
}

.bass-trombone {
  border: 2px solid #7d82ee;
}

.valve-trombone {
  border: 2px solid #8bb115;
}

.trombone h3 {
  margin-top: 0;
  padding-block: 0.7em;
  font-size: large;
  color: #faf7e4;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
}

.tenor-trombone h3 {
  background-image: linear-gradient(
    70deg,
    hsl(0deg 81% 62%) 0%,
    hsl(15deg 87% 67%) 70%,
    hsl(24deg 90% 74%) 100%
  );
}

.bass-trombone h3 {
  background-image: linear-gradient(
    90deg,
    hsl(226deg 91% 62%) 0%,
    hsl(237deg 77% 71%) 50%,
    hsl(244deg 61% 76%) 100%
  );
}

.valve-trombone h3 {
  background-image: linear-gradient(
    90deg,
    hsl(101deg 55% 42%) 2%,
    rgb(127, 177, 29) 37%,
    rgb(162, 177, 5) 86%
  );
}

.trombone h4 {
  font-size: 30px;
  margin-block: 15px;
}

.trombone button {
  margin-block: 10px;
  transition: transform 150ms, box-shadow 150ms;
}

.tenor-trombone button {
  background-image: linear-gradient(
    70deg,
    hsl(0deg 81% 62%) 0%,
    hsl(15deg 87% 67%) 70%,
    hsl(24deg 90% 74%) 100%
  );
  border: none;
  padding: 0.5em 1em;
  border-radius: 999px;
}

.bass-trombone button {
  background-image: linear-gradient(
    90deg,
    hsl(226deg 91% 62%) 0%,
    hsl(237deg 77% 71%) 50%,
    hsl(244deg 61% 76%) 100%
  );
  border: none;
  padding: 0.5em 1em;
  border-radius: 999px;
}

.valve-trombone button {
  background-image: linear-gradient(
    90deg,
    hsl(101deg 55% 42%) 2%,
    rgb(127, 177, 29) 37%,
    rgb(162, 177, 5) 86%
  );
  border: none;
  padding: 0.5em 1em;
  border-radius: 999px;
}

.trombone button:hover {
  transform: scale(110%);
  box-shadow: 2px 2px 10px #6f6c8ac3;
}

.trombone:hover {
  transform: scale(105%);
  box-shadow: 4px 4px 15px #6f6c8ac3;
}

/* footer */
footer {
  text-align: end;
  padding-inline-end: 1.7em;
  background-color: #fcf6d4;
  padding-block: 1em;
}

.footer-links-container > ul > li {
  list-style-type: none;
  display: inline-block;
  padding-inline: 5px;
}

.footer-links-container a {
  color: black;
}

footer p {
  margin-bottom: 10px;
}

@media only screen and (max-width: 800px) {
  header {
    display: flex;
    flex-direction: column;
  }

  .header-info {
    position: relative;
    top: 0px;
  }
}

@media only screen and (max-width: 500px) {
  nav > ul {
    display: flex;
    flex-direction: column;
  }

  nav > ul > li {
    margin-block: 0.3em;
  }

  .header-info {
    position: relative;
    top: 100px;
  }

  .trombone-info {
    position: relative;
    top: 100px;
  }

  iframe {
    position: relative;
    top: 100px;
  }

  .pricing-wrapper {
    position: relative;
    top: 100px;
  }

  footer {
    position: relative;
    top: 100px;
  }
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console