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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <header id="header">
    <img src="https://i.postimg.cc/t4G7vTcY/logo.png" alt="logo" id="header-img">
    <input type="checkbox" name="check" id="check">
    <label for="check" class="show"><i class="fas fa-bars"></i></label>
    <nav id="nav-bar">
      <a href="#about" class="nav-link">About</a>
      <a href="#plans" class="nav-link">Plan</a>
      <a href="#contact" class="nav-link">Contact</a>
      <label for="check" class="close"><i class="fas fa-times"></i></label>
    </nav>
  </header>
  <div class="video-box">
   <iframe src="https://streamable.com/e/5lvqp0?autoplay=1"  allowfullscreen></iframe>
    <p class="slogan">Simple + Moderate + Balanced <span>Healthy</span></p>
  </div>
  <div id="about">
    <div class="img-box">
      <img src="https://i.postimg.cc/VLdNktxS/img-box.jpg" alt="img-box">
    </div>
    <div class="text-box">
      <h2>About Light Canteen</h2>
      <p>Chef-designed lunch box include three low one high principle(low sugar low fat
        low salinity,high fiber) balanced meals.</p>
      <p>Provide you with healthy and comfortable every day</p>
    </div>
  </div>
  <div id="plans">
    <h2>Choose your lovely meal plan</h2>
    <div class="plan-box">
      <div class="plan">
        <h3>Protein</h3>
        <i class="fas fa-drumstick-bite"></i>
        <p>This plan will completely remove any carbohydrates.</p>
      </div>
      <div class="plan">
        <h3>Balance</h3>
        <i class="fas fa-balance-scale"></i>
        <p>This plan will completely provide daily meals balance.</p>
      </div>
      <div class="plan">
        <h3>Vegetarian</h3>
        <i class="fas fa-carrot"></i>
        <p>This plan will completely remove any meat.</p>
      </div>
    </div>
  </div>
  <form action="#" class="subscribe" id="form">
    <p>Subscribe us for news, recipes & more</p>
    <div class="email-input">
      <label for="email"></label>
      <input type="email" name="email" id="email" placeholder="Enter your email">
      <input type="submit" id="submit" value="Subscribe">
    </div>
  </form>
  <footer id="contact">
    <div class="footer-nav">
      <a href="#video">Home</a>
      <a href="#about">About</a>
      <a href="#plans">Plan</a>
    </div>
    <div class="contact-info">
      <p>contact@light-canteen.com</p>
      <p>(000)000-0000</p>
      <p>&copy;Light Canteen,2020</p>
    </div>
    <div class="social-media">
      <div>
        <p>Follow us</p>
      </div>
      <div class="icons">
        <div class="icon"><i class="fab fa-facebook-f"></i></div>
        <div class="icon"><i class="fab fa-twitter"></i></div>
        <div class="icon"><i class="fab fa-instagram"></i></div>
      </div>
    </div>
  </footer>

  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  font-family: "Raleway", sans-serif;
  outline: none;
}

body {
  width: 100%;
  min-height: 100vh;
}

header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 80px;
  line-height: 80px;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  z-index: 10;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.9);
}

header #header-img {
  padding-left: 30px;
  width: 200px;
}

header #nav-bar .nav-link {
  color: #05c464;
  padding-right: 30px;
}

header #nav-bar .nav-link:hover,
header i:hover {
  color: #019149;
}

header i {
  color: #05c464;
}

header .show {
  position: absolute;
  right: 5%;
}

header .show,
header .close {
  transition: 0.5s;
  font-size: 22px;
  cursor: pointer;
  display: none;
}

#check {
  position: absolute;
  visibility: hidden;
  z-index: -1;
}

.video-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  height:0px;
  padding-bottom:56.250%;
}

.video-box::after {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
}

.video-box iframe {
  width: 100%;
  height:100%;
  position:absolute;
  left:0px;
  top:0px;
  overflow:hidden;"
  vertical-align: bottom;
  frameborder= 0;
}

.video-box .slogan {
  position: absolute;
  top: 60%;
  left: 0;
  transform: translateY(-50%);
  font-size: 3em;
  color: #000;
  mix-blend-mode: overlay;
  font-weight: 700;
}

.video-box .slogan span {
  color: #fff;
  display: block;
  font-size: 3em;
}

#about {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

#about .img-box {
  flex: 1;
  height: 500px;
}

#about .img-box img {
  width: 100%;
}

#about .text-box {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#about .text-box h2 {
  font-size: 3rem;
  padding: 0 0 30px;
}

#about .text-box p {
  text-align: left;
  font-size: 1.5rem;
  padding: 0 50px;
}

#about .text-box p:nth-of-type(1) {
  padding-bottom: 30px;
}

#plans {
  position: relative;
  width: 100%;
  background: url(https://i.postimg.cc/c4gsSS3w/plan.jpg) no-repeat center center / cover;
  vertical-align: top;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 90px 0 50px;
}

#plans::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

#plans h2 {
  color: #fff;
  z-index: 2;
  font-size: 3rem;
  padding-bottom: 30px;
}

#plans .plan-box {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#plans .plan-box .plan {
  width: 30%;
  height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  border: 2px solid #07a054;
  z-index: 2;
}

#plans .plan-box .plan:hover {
  background: #fff;
  transform: scale(1.1);
  z-index: 3;
}

#plans .plan-box .plan h3 {
  font-size: 2rem;
  letter-spacing: 2px;
}

#plans .plan-box .plan i {
  font-size: 6rem;
}

#plans .plan-box .plan p {
  font-size: 1.3rem;
  padding: 0 20px;
  text-align: center;
}

#form {
  position: relative;
  width: 100%;
  padding: 50px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #05c464;
  color: #fff;
}

#form p {
  font-size: 1.5rem;
  padding-bottom: 30px;
}

#form .email-input {
  position: relative;
  width: 100%;
  height: 45px;
  display: flex;
  justify-content: center;
}

#form .email-input #email {
  width: 250px;
  font-size: 16px;
  padding-left: 15px;
  border: none;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

#form #submit {
  font-size: 16px;
  color: #fff;
  background: #05572e;
  border: none;
  padding: 0 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

#contact {
  width: 100%;
  padding: 30px 0;
  background: #068545;
  color: #fff;
  display: flex;
  justify-content: space-around;
  font-size: 1.2rem;
}

#contact .footer-nav {
  display: flex;
  flex-direction: column;
}

#contact .footer-nav a {
  color: #fff;
}

#contact .footer-nav a:not(:last-child),
#contact .contact-info p:not(:last-child) {
  padding-bottom: 10px;
}

#contact .social-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#contact .social-media .icons {
  display: flex;
  padding-top: 10px;
}

#contact .social-media .icons .icon {
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 1px solid #fff;
}

#contact .social-media .icons .icon:not(:last-child) {
  margin-right: 5px;
}

@media (max-width: 750px) {
  .video-box .slogan,
  .video-box .slogan span {
    font-size: 2em;
  }

  #about {
    height: 500px;
  }

  #about .img-box {
    position: absolute;
    width: 100%;
    z-index: -1;
  }

  #about .text-box {
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 30px 0;
  }

  #about .text-box h2,
  #plans h2 {
    font-size: 2rem;
  }

  #about .text-box p {
    font-size: 1rem;
  }

  #plans {
    display: block;
    background: #e0faed;
  }

  #plans::after {
    background: none;
  }

  #plans h2 {
    color: #000;
  }

  #plans .plan-box {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  #plans .plan-box .plan {
    width: 60%;
    margin-bottom: 20px;
  }
}

@media (max-width: 550px) {
  header .show,
  header .close {
    display: block;
  }

  header #nav-bar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 150px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    background: #fff;
    font-size: 28px;
    transition: 0.5s ease-in-out;
    text-align: center;
  }

  header #nav-bar .nav-link {
    padding: 0;
  }

  header .close {
    position: absolute;
    top: 40px;
    right: 20px;
  }

  #check:checked ~ #nav-bar {
    right: 0;
  }

  .video-box .slogan,
  .video-box .slogan span {
    font-size: 1.3em;
  }

  #plans h2 {
    padding: 0 10px 30px;
  }
  #plans .plan-box .plan {
    width: 80%;
    margin-bottom: 20px;
  }

  #form p {
    font-size: 1.3rem;
  }

  #contact {
    flex-direction: column;
    align-items: center;
  }

  #contact .footer-nav,
  #contact .contact-info {
    margin-bottom: 30px;
  }

  #contact .footer-nav {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console