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 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

              
                <body>
  <section>
    <header>
      <a href=""><img src="https://i.postimg.cc/nhXHc8wM/kisspng-business-three-dimensional-space-3d-computer-graph-little-whites-clock-time-theme-5aa0cb279a.png" alt="" class="logo"></a>
      <div class="toggle" onclick="togglemenu()"></div>
      <ul class="navigation">
        <li><a href="#">Home</a></li>
        <li><a href="#">Products</a></li>
        <li><a href="#">What's New</a></li>
        <li><a href="#">Newsletter</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </header>
    <div class="content">
      <div class="text">
        <h1>Branded Watches <br><span>You kill it</span></h1>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat consectetur reiciendis, mollitia doloremque placeat voluptatum provident temporibus quas sed itaque soluta quam esse recusandae ipsum fugit accusamus? Iure, voluptates quia?</p>
        <a href="#">View all product</a>
      </div>
      <div class="img-box">
        <img src="https://media.giphy.com/media/JQARoAaBWNelwZ5gi0/giphy.gif" alt="mainimg" id="slide">
      </div>
    </div>
    <ul class="thumb">
      <li><img src="https://i.postimg.cc/zvMgtsdM/kisspng-omega-speedmaster-omega-seamaster-watch-coaxial-es-watches-5acdc390e168f2-449941241523434384.png" alt="" onclick="chngimg('https://i.postimg.cc/zvMgtsdM/kisspng-omega-speedmaster-omega-seamaster-watch-coaxial-es-watches-5acdc390e168f2-449941241523434384.png')"></li>

      <li><img src="https://i.postimg.cc/jdpZFPN2/kisspng-bulgari-automatic-watch-jewellery-power-reserve-in-bulgari-watches-women-watch-sapphire-watc.png" alt="" onclick="chngimg('https://i.postimg.cc/jdpZFPN2/kisspng-bulgari-automatic-watch-jewellery-power-reserve-in-bulgari-watches-women-watch-sapphire-watc.png')"></li>

      <li><img src="https://i.postimg.cc/7ZnDPggt/74651-chronograph-watch-baselworld-speake-marin-j12-chanel.png" alt="" onclick="chngimg('https://i.postimg.cc/7ZnDPggt/74651-chronograph-watch-baselworld-speake-marin-j12-chanel.png')"></li>

    </ul>
  </section>

</body>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
header {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  padding: 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header .logo {
  position: relative;
  max-width: 100px;
  padding-left: 30px;
}
header ul {
  position: relative;
  display: flex;
}
header ul li {
  list-style: none;
}
header ul li a {
  display: inline-block;
  margin-right: 40px;
  text-decoration: none;
  font-size: 1.2em;
  color: #ffff;
  font-family: verdana;
}
header ul li a:hover {
  color: #badc58;
}
.content {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.content .text {
  position: relative;
  width: 50%;
  padding-left: 30px;
}
.content .text h1 {
  font-size: 3em;
  color: #fff;
  line-height: 1.5em;
  text-transform: uppercase;
  font-weight: 900;
}
.content .text h1 span {
  font-size: 1.7em;
  color: #badc58;
}
.content .text p {
  color: #fff;
  line-height: 1.2em;
  font-family: sans-serif;
}
.content .text a {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 20px;
  text-decoration: none;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 20px;
  text-transform: capitalize;
  color: #fff;
  font-weight: bold;
  transition: 0.4s;
}
.content .text:hover a {
  background: #badc58;
}
.content .img-box {
  width: 40%;
  display: flex;
  justify-content: flex-end;
  /* margin-top: 50px; */
  padding-right: 10px;
}
.content .img-box img {
  margin-top: 130px;
  width: 100%;
}
.thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  display: flex;
}
.thumb li {
  display: inline-block;
  list-style: none;
  margin: 5px 30px;
  cursor: pointer;
  transition: 0.5s;
}
.thumb li:hover {
  transform: translateY(-20px);
}
.thumb li img {
  width: 100px;
}

/*add media queries*/

section {
  padding-bottom: 30px;
}

@media (max-width: 991px) {
  header ul {
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    background: #fff;
    z-index: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
  }
  header ul li a {
    color: #000;
    margin: 10px;
    font-size: 3rem;
    padding: 10px;
    transition: 0.5s;
  }
  header ul li a:hover {
    color: #badc58;
  }
  header ul.active {
    visibility: visible;
    opacity: 1;
  }
  .toggle {
    background: url("https://i.postimg.cc/ZngHDHRB/iconfinder-menu-alt-134216.png")
      no-repeat;
    background-size: 40px;
    width: 40px;
    height: 40px;
    filter: invert(1);
    margin-right: 70px;
    cursor: pointer;
    z-index: 2;
  }
  .toggle.active {
    background: url("https://i.postimg.cc/4NDw6Wqj/Pngtree-icon-close-button-4401093.jpg")
      no-repeat;
    background-position: center;
    background-size: 40px;
    filter: invert(0);
  }
  .content {
    flex-direction: column;
    margin-top: 50px;
    padding: 10px 20px;
  }
  .content .text {
    position: relative;
    width: 100%;
  }
  .content .text h1 {
    font-size: 2.4em;
  }
  .content .text p {
    font-size: 15px;
  }
  .content .text a {
    padding: 5px 10px;
    font-size: 12px;
  }
  .content .img-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -120px;
  }
  .content .img-box img {
    width: 300px;
  }
  .thumb {
    margin-bottom: 40px;
  }
  .thumb li img {
    width: 40px;
  }
}

              
            
!

JS

              
                function chngimg(anything) {
  document.getElementById("slide").src = anything;
}
function togglemenu() {
  var toggle = document.querySelector(".toggle");
  var navigation = document.querySelector(".navigation");
  toggle.classList.toggle("active");
  navigation.classList.toggle("active");
}

              
            
!
999px

Console