Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- 

Hello Camper!

Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<header id="header">
  <div class="logo">
    <img src="https://www.freeiconspng.com/uploads/shoe-icon-9.png" alt="Svg Shoe Icon" id="header-img" />
    Logo.
  </div>
  <nav id="nav-bar">
    <ul>
      <li><a href="#form" class="nav-link">Subscribe</a></li>
      <li><a href="#type" class="nav-link">Type</a></li>
      <li><a href="#advantage" class="nav-link">Advantage</a></li>
    </ul>
  </nav>
</header>
<div class="wrap">
  <div class="video-wrap">
    <h1>Shoes Store</h1>
    <video id="video" playsinline autoplay loop>
      <source src="https://www.shutterstock.com/shutterstock/videos/1074764318/preview/stock-footage-running-silhouette-sport-training-outdoor-marathon-triathlon-exercising-triathlete-sport-recreation.webm" type="video/webm">
      <source src="https://www.shutterstock.com/shutterstock/videos/1074764318/preview/stock-footage-running-silhouette-sport-training-outdoor-marathon-triathlon-exercising-triathlete-sport-recreation.mp4" type="video/mp4">
    </video>
  </div>
  <div class="type" id="type">
    <h1>Shoes Type</h1>
    <div class="grid-gallery">
      <div>
        <div class="text">
          <h2>Golf</h2>
        </div>
        <img src="https://www.planetsports.asia/media/wysiwyg/Golf-01_1.jpeg">
      </div>
      <div>
        <div class="text">
          <h2>Running</h2>
        </div>
        <img src="https://www.planetsports.asia/media/wysiwyg/running-01_1.jpeg" alt="Sport Shoes Photo">
      </div>
      <div>
        <div class="text">
          <h2>Sneakers</h2>
        </div>
        <img src="https://www.planetsports.asia/media/wysiwyg/CATEGORY-BANNER-02_1.jpeg">
      </div>
    </div>
  </div>
  <div id="advantage">
    <h1>Advantage</h1>
    <div class="advantage-grid">
      <section>
        <h2>Premium</h2>
        <p>
          Our shoes using premium materials and choosed by expert
        </p>
      </section>
      <section>
        <h2>Fast Shipping</h2>
        <p>
          we make sure you will receive our product as soon as posible
        </p>
      </section>
      <section>
        <h2>Experienced</h2>
        <p>
          We have been in this sector for more than 10 years
        </p>
      </section>
    </div>
  </div>
</div>
<form id="form" action="https://www.freecodecamp.com/email-submit">
  <h1>Subscribe</h1>
  <input type="email" id="email" placeholder="example@email.com" name="email">
  <input type="submit" id="submit">
  <p>Subscribe to our store to get update about discount or our product update</p>
</form>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Bakbak+One&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Display:ital,wght@0,400;0,700;1,400;1,500;1,700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans Display", sans-serif;
}

header {
  background-color: #dadada;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 50px;
  position: fixed;
  width: 100%;
  z-index: 999;
}

header .logo {
  font-family: "Bakbak One", cursive;
  font-size: 2rem;
  display: flex;
  align-items: center;
}

header .logo #header-img {
  width: 3rem;
}

header nav {
  width: 30%;
}

header nav ul {
  list-style: none;
  display: flex;
  width: 100%;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 500;
}

header nav ul li a.nav-link {
  text-decoration: none;
  color: black;
}

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

  header nav {
    width: 300px;
  }
}

@media screen and (max-width: 350px) {
  header {
    padding: 5px;
  }

  header nav {
    width: 100%;
  }
}

.wrap {
  width: 100%;
  min-height: 100vh;
  padding: 100px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrap > * {
  margin-bottom: 30px;
  width: 100%;
}

.wrap .video-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap .video-wrap h1 {
  position: absolute;
  font-size: 4rem;
  color: white;
  font-family: "Bakbak One", cursive;
  letter-spacing: 10px;
  font-weight: 500;
  text-shadow: 5px 3px rgb(0, 0, 0);
}

.wrap .video-wrap video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

@media screen and (max-width: 600px) {
  .wrap .video-wrap h1 {
    width: 50%;
    line-height: 50px;
  }
}

@media screen and (max-width: 470px) {
  .wrap .video-wrap {
    justify-content: left;
  }

  .wrap .video-wrap h1 {
    margin-left: 20px;
  }
}

@media screen and (max-width: 340px) {
  .wrap .video-wrap h1 {
    font-size: 2.5rem;
    line-height: 35px;
  }
}

form input {
  padding: 5px;
  border-radius: 5px;
  border: black 1px solid;
  font-size: 1rem;
}

form {
  background: linear-gradient(
      55deg,
      rgba(55, 71, 105, 0.9),
      rgba(135, 151, 173, 0.9),
      rgba(178, 190, 218, 0.9)
    ),
    url(https://c0.wallpaperflare.com/preview/833/512/948/shoes-shoe-store-rack.jpg);
  color: white;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 50px 20px;
}

form input[type="email"] {
  width: 200px;
}

form input[type="submit"] {
  cursor: pointer;
  width: 100px;
}

form p {
  width: 300px;
  font-style: italic;
}

@media screen and (max-width: 445px) {
  form {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  form > * {
    margin-bottom: 10px;
  }

  form input {
    padding: 10px;
  }

  form p {
    width: 100%;
  }
}

.wrap .type .grid-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
}

.wrap .type h1 {
  margin-bottom: 5px;
}

.wrap .type .grid-gallery > div {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap .type .grid-gallery div .text {
  position: absolute;
  transition: 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap .type .grid-gallery div .text h2 {
  color: white;
  text-transform: uppercase;
  font-size: 2.5rem;
  text-shadow: 3px 3px 2px black;
}

.wrap .type .grid-gallery div img {
  width: 100%;
  object-fit: cover;
}

.wrap .type .grid-gallery div:hover .text {
  transform: scale(1.1);
  background-color: rgba(226, 226, 226, 0.5);
  height: 100%;
  width: 100%;
}

@media screen and (max-width: 835px) {
  .wrap .type .grid-gallery div .text h2 {
    font-size: 2rem;
  }
}

@media screen and (max-width: 705px) {
  .wrap .type .grid-gallery div .text h2 {
    font-size: 1.7rem;
  }
}

@media screen and (max-width: 645px) {
  .wrap .type .grid-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrap .type .grid-gallery div .text h2 {
    font-size: 2rem;
  }
}

@media screen and (max-width: 500px) {
  .wrap .type .grid-gallery {
    grid-template-columns: 1fr;
  }

  .wrap .type .grid-gallery div .text h2 {
    font-size: 3rem;
  }
}

@media screen and (max-width: 345px) {
  .wrap .type .grid-gallery div .text h2 {
    font-size: 2rem;
  }
}

@media screen and (max-width: 260px) {
  .wrap .type .grid-gallery div .text h2 {
    font-size: 1.5rem;
  }
}
#advantage .advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 15px;
}
#advantage .advantage-grid section {
  background-color: rgba(238, 238, 238, 0.8);
  padding: 20px 15px;
  border-radius: 10px;
  transition: 0.3s;
  box-shadow: 5px 7px 10px rgba(83, 83, 83, 0.5);
}
#advantage .advantage-grid section:hover {
  background-color: rgba(204, 204, 204, 0.8);
}
@media screen and (max-width: 885px) {
  #advantage .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (max-width: 640px) {
  #advantage .advantage-grid {
    grid-template-columns: 1fr;
  }
}

              
            
!

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