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

              
                <body>
  <header>
    <div id="nav_toggle">
      <div>
        <span></span>
        <span></span>
      </div>
    </div>
    <!--nav_toggle-->
  </header>
  <nav>
    <ul>
      <li><a href="#"><span>Home</span></a></li>
      <li><a href="#"><span>News</span></a></li>
      <li><a href="#"><span>Service</span></a></li>
      <li><a href="#"><span>Contact</span></a></li>
      <li><a href="#"><span>About</span></a></li>
    </ul>
  </nav>
  <div class="container">
    <figure>
      <img src="https://binary-graffiti.com/wp/images/menu_img_002.jpg" alt="Main_theme">
      <figcaption>
        <span class="category">Produced by</span>
        <h1>Binary Graffiti</h1>
      </figcaption>
    </figure>
  </div>
  <!--contaienr-->
</body>
              
            
!

CSS

              
                /*============================
body style
============================*/
body {
  position: relative;
  margin: 0 auto;
  max-width: 800px;
}
/*============================
nav style
============================*/
/*image style*/
img {
  width: 100%;
  object-fit: cover;
  object-position: 0 0;
}
/*hamburger menu style*/
#nav_toggle {
  position: absolute;
  top: 2em;
  right: 2em;
  z-index: 20;
}
#nav_toggle div {
  position: relative;
  display: block;
  top: 4px;
  width: 32px;
  height: 32px;
  z-index: 100;
}
#nav_toggle span {
  position: absolute;
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  -webkit-transition: 0.5s ease-in-out;
  -moz-transition: 0.5s ease-in-out;
  transition: 0.5s ease-in-out;
}
/*hamburger menu close style*/
#nav_toggle span:nth-child(1) {
  top:0px;
}
#nav_toggle span:nth-child(2) {
  top:12px;
}
/*hamburger menu open style*/
.open #nav_toggle span:nth-child(1) {
  top: 6px;
  -webkit-transform: rotate(155deg);
  -moz-transform: rotate(155deg);
  transform: rotate(155deg);
}
.open #nav_toggle span:nth-child(2) {
  top: 6px;
  -webkit-transform: rotate(-155deg);
  -moz-transform: rotate(-155deg);
  transform: rotate(-155deg);
}
/*nav style*/
nav {
  position: absolute;
  padding: 2em;
  width: 82%;
  opacity: 0;
  z-index: 0;
  -webkit-transform: scale(0.85);
  -ms-transform: scale(0.85);
  transform: scale(0.85);
  transition: 0.5s;
}
/*nav list style*/
nav ul {
  list-style-type: none;
  padding: 2em 0 0 0;
}
nav ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
/*nav link style*/
nav ul li a {
  padding: 1.5em 0;
  display: block;
  text-decoration: none;
  font-size: 1.250em;
  font-weight: 300;
  color: #fff;
  transition: 0.5s;
}
nav ul li a:hover {
  padding: 1.5em 1.0em;
  opacity: 0.5;
  transition: 0.5s;
}
nav ul li:last-child {
  border: none;
}
.add_nav {
  display: block;
  opacity: 1;
  z-index: 10;
  -webkit-transform: scale(1);
  -ms-transform: scale(1);
  transform: scale(1);
  transition: 0.5s;
}
.container {
  position: relative;
}
.add_container {
  -webkit-filter: blur(8px);
  -moz-filter: blur(8px);
  -o-filter: blur(8px);
  -ms-filter: blur(8px);
  filter: blur(8px);
  transition: 0.5s;
}
figure {
  margin: 0;
  padding: 0;
}
figcaption {
  position: absolute;
  bottom: 0;
  padding: 2em 2em 2.5em 2em;
  color: #fff;
  z-index: 5;
}
figcaption h1, figcaption span {
  text-shadow: 0px 0px 10px rgba(0,0,0,0.25);
}
figcaption h1 {
  padding: 0 0 0.25em 0 ;
  margin: 0 0 0.25em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
figcaption .category {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8em;
  padding: 0 0 0.3em;
  color: rgba(255,255,255, 0.7);
}
              
            
!

JS

              
                $(function(){
  //hamburger menu click
  $('#nav_toggle').click(function(){
    $('header').toggleClass('open'); 
    $('.container').toggleClass('add_container');
    $('nav').toggleClass('add_nav');
  });
  //menu link click
  $('nav a').click(function(){
    $("header").toggleClass('open');
    $('.container').toggleClass('add_container');
    $('nav').toggleClass('add_nav');
  });
});
              
            
!
999px

Console