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

              
                e" <div class="site-wrapper">
  <header>
    <div id="top" class="top">
      <a href="#0" class="button"><span><svg style="width:16px;height:16px" viewBox="0 0 24 24">
    <path fill="currentColor" d="M10,17V14H3V10H10V7L15,12L10,17M10,2H19A2,2 0 0,1 21,4V20A2,2 0 0,1 19,22H10A2,2 0 0,1 8,20V18H10V20H19V4H10V6H8V4A2,2 0 0,1 10,2Z" />
</svg></span><span>Log In</span></a>
      <a href="#0" class="button button-green"><span><svg style="width:16px;height:16px" viewBox="0 0 24 24">
    <path fill="currentColor" d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" />
</svg></span><span>Sign Up</span></a>
      <div title="User Adminstration" id="toggle" class="toggle"><span><svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="currentColor" d="M11 9C11 10.66 9.66 12 8 12C6.34 12 5 10.66 5 9C5 7.34 6.34 6 8 6C9.66 6 11 7.34 11 9M14 20H2V18C2 15.79 4.69 14 8 14C11.31 14 14 15.79 14 18M22 12V14H13V12M22 8V10H13V8M22 4V6H13V4Z" />
        </svg></span></div>
    </div>
    <div id="logo"><div>    <a href="#0" class="logo"><span>XYZ</span><span> Corporation</span></a></div></div>
    
    <nav class="site-nav">
      <ul>
        <li><a class="nv-lk" href="#0" data-target="products">Products</a></li>
        <li><a  class="nv-lk" href="#0" data-target="pricing">Pricing</a></li>
      </ul>
      <ul>
        <li><a  class="nv-lk" href="#0" data-target="careers">Careers</a></li>
        <li><a  class="nv-lk" href="#0" data-target="contact">Contact</a></li>
      </ul>
    </nav>
    
  </header>

  <main>
    <section class="active" id="products"><div><h1>Products</h1><p>Barbary Coast cog jack lanyard mizzenmast broadside belaying pin avast trysail gally. Yawl Blimey hands bring a spring upon her cable man-of-war scourge of the seven seas lanyard American Main weigh anchor Buccaneer. Jolly boat list hearties barkadeer spanker league hogshead bring a spring upon her cable bilge rat scuttle.
</p>
      <div class="itm">
        <div></div>
        <div></div>
        <div></div>
      </div>        
      
      </div></section>
    <section id="pricing"><div><h1>Pricing</h1><p>Barbary Coast cog jack lanyard mizzenmast broadside belaying pin avast trysail gally. Yawl Blimey hands bring a spring upon her cable man-of-war scourge of the seven seas lanyard American Main weigh anchor Buccaneer. Jolly boat list hearties barkadeer spanker league hogshead bring a spring upon her cable bilge rat scuttle.
</p></div></section>
    <section id="careers"><div><h1>Careers</h1><p>Barbary Coast cog jack lanyard mizzenmast broadside belaying pin avast trysail gally. Yawl Blimey hands bring a spring upon her cable man-of-war scourge of the seven seas lanyard American Main weigh anchor Buccaneer. Jolly boat list hearties barkadeer spanker league hogshead bring a spring upon her cable bilge rat scuttle.
</p></div></section>
    <section id="contact"><div><h1>Contact</h1><p>Barbary Coast cog jack lanyard mizzenmast broadside belaying pin avast trysail gally. Yawl Blimey hands bring a spring upon her cable man-of-war scourge of the seven seas lanyard American Main weigh anchor Buccaneer. Jolly boat list hearties barkadeer spanker league hogshead bring a spring upon her cable bilge rat scuttle.
</p></div></section>
  </main>
  
  <aside></aside>

  <footer><div>&copy;<span id="ytd"></span> <span><span>Rachel H. Designer</span></div></footer>
</div>

              
            
!

CSS

              
                html {
  scroll-behavior: smooth;
}
header a:link,
header a:visited,
header a:active {
  color: white;
}
.site-nav > ul > li {
  position: relative;
}
.site-nav > ul > li:after {
  content: "";
  position: absolute;
  background-color: white;
  width: 70px;
  height: 3px;
  left: 0px;
  top: 25px;
  opacity:0;
  transform: translateY(50px);
  transition: transform 500ms ease,opacity 200ms ease-in-out;
}
.site-nav > ul > li:hover:after {
  transform: translateY(0);opacity:1;
}
.site-nav > ul > li:nth-child(2):after {
  width: 52px;
}
.site-nav > ul:nth-child(2) > li:nth-child(1):after {
  width: 57px;
}
.site-nav > ul:nth-child(2) > li:nth-child(2):after {
  width: 59px;
}
body {
  font-family: "Source Sans Pro", sans-serif;
}
h1,
h2,
h3,
h4,
h5,
#logo {
  font-family: "Fjalla One", sans-serif;
}
.site-wrapper {
  height: 100vh;
  width: 100vw;
  position: relative;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background-color: #29a8ab;

  z-index: 5;
}
#products {
  margin-top: 25vh;
}
h1 {
  font-size: 25px;
  opacity: 1;
  text-transform: uppercase;
}
section {
  min-height: 0;
  height: 0;
  transform: translateY(400vh);
  overflow: hidden;
  width: 100vw;
  transition: min-height 450ms ease-in-out, transform 450ms ease-in-out;
}
section.active {
  transform: translateY(0);
  min-height: 60vh;
  height: auto;
}
section > div {
  padding: 30px;
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #29a8ab;
}
.toggle {
  background-color: inherit;
  border-radius: 0px 0px 10px 10px;
  position: absolute;
  right: 11px;
  padding: 10px;
  cursor: pointer;
}
.toggle span {
  position: relative;
}
.toggle span svg {
  position: relative;
  top: 3px;
}
.top {
  background-color: #ddd;
  text-align: right;
  padding-right: 5px;
  padding-top: 2px;
  padding-bottom: 2px;
}
#top {
  transform: translateY(-40px);
  transition: transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#top.show {
  transform: translateY(0);
  z-index: 100;
}
.site-nav ul {
  display: flex;
}
.top a:link {
  text-decoration: none;
  color: white;
}
.button {
  background-color: rgba(41, 168, 171, 0.5);
  width: 100px;
  border-radius: 4px;
  display: inline-block;
  text-align: center;
  margin: 5px;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
  transition: background-color 450ms ease;
}
.button:hover {
  background-color: rgba(41, 168, 171, 1);
}
.button > span:first-child {
  position: absolute;
  left: 10px;
}
.button > span:nth-child(2) {
  position: relative;
  left: 10px;
}
nav {
  background-color: rgba(187, 187, 187, 1);
}
nav a:link {
  text-decoration: none;
}
nav ul {
  position: absolute;
  font-size: 18px;
}
nav ul:first-child {
  left: 30px;
  top: 90px;
}
nav ul:nth-child(2) {
  right: 30px;
  top: 90px;
}
nav ul > li:first-child {
  padding-right: 30px;
}
#logo {
  text-align: center;
  text-transform: uppercase;
  z-index: -1;
  border: 3px solid white;
  position: relative;
  left: 50%;
  top: 1vh;
  transform: translateX(-50%);
  display: inline-block;
}
#logo > div {
  position: relative;
  background-color: #666;
  display: inline-block;
  height: 90px;
  padding: 20px;
}
#logo a:link {
  text-decoration: none;
}
#logo a span:first-child {
  padding-left: 4px;
  position: relative;
  top: 5px;
  left: 2px;
  letter-spacing: 8px;
  font-size: 60px;
}
#logo a span:nth-child(2) {
  position: relative;
  top: 6px;
  font-size: 20px;
  display: block;
}
footer > div {
  text-align: center;
  color: white;
  font-size: 20px;
  padding-top: 20px;
}
.itm {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}
.itm > div {
  height: 100px;
  width: 150px;
  margin: 10px;
  background-color: #ccc;
}
p {
  opacity: 0.7;
  line-height: 20px;
  margin-top: 10px;
}
@media (max-width: 520px) {
  #logo {
    display: none;
  }
}

              
            
!

JS

              
                (function() {
  "use strict";
  //appends current year
  ytd();
  function ytd() {
    const d = new Date();
    const n = d.getFullYear();
    const yr = document.getElementById("ytd");
    yr.innerHTML = n;
  }
  const tog = document.getElementById("toggle");
  const top = document.getElementById("top");
  toggle.addEventListener("click", function() {
    top.classList.toggle("show");
  });
  const lk = document.querySelectorAll(".nv-lk");
  for (var i = 0; i < lk.length; i++) {
    var itm = lk[i];
    itm.addEventListener("click", function() {
      var sects = document.querySelectorAll("section");
      sects.forEach(s => s.classList.remove("active"));
      lk.forEach(n => n.classList.remove("active"));
      var tg = this.getAttribute("data-target");
      this.classList.add("active");
      var sect = document.getElementById(tg);
      sect.classList.add("active");
    });
  }
})();

              
            
!
999px

Console