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

              
                <nav id="slideLeft">
  <div class="logo-head">
    <div class="logo-txt">Logo / Menu</div>
  </div>
  <ul>
    <a href="#!"><li><i class="fa fa-home"></i> Home</li></a>
  				  <a href="#!"><li><i class="fa fa-comment"></i> Blog</li></a>
    <a href="#!"><li><i class="fa fa-user"></i> About</li></a>
				    <a href="#!"><li> <i class="fa fa-quote-left"></i> Forum</li></a>
    <a href="#!"><li><i class="fa fa-envelope"></i> Contact</li></a>
  </ul>
</nav>
<div class="container">     
  <div class="containerOverlay"><a href="#!"></a></div>
  <div class="nav1">
    <a href="#slideLeft" class="button"><i class="fa fa-bars txt-red"></i></a>
  </div>
</div>
<header>
  <div class="full header txt-red">
    <div class="header-title">
      <h2>Subtitle</h2>
      <h1>Heading</h1>
    </div>
    <a href="#start" class="scrollTo"><div class="icon-scroll opacity-0-3 hover-opacity-1-0"></div></a>
  </div>
</header>
<section id="start">
  <div class="column white txt-blue">
    <p class="border">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
  <div class="column blue txt-white">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
</section>
<section>
  <div class="column red txt-white">
    <div class="border-title">
      <h1>Android 5</h1>
      <h2>(Lollipop)</h2>
    </div>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
  <div class="column white txt-red">
    <img class="hover-opacity-0-8" src="http://technoman.org/wp-content/uploads/2014/12/smartphone-android-png-android-smartphone-png---viewing-gallery-gambar.png">
  </div>
</section>
<section>
  <div class="column white txt-green">
    <div class="border-title">
      <h1>HEADING</h1>
      <h2>(Subtitle)</h2>
    </div>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  </div>
  <div class="column green txt-white opacity">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
</section>
<footer class="dgrey txt-lgrey">
  <div class="column">
    <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h3>
  </div>
  <div class="column">
    <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h3>
  </div>
</footer>
              
            
!

CSS

              
                body {
  font-family: 'Roboto', Open sans, Helvetica, Arial, sans-serif;
}

.column {
  min-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.full {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.header {
  width: 100%;
  height: 100vh;
  background: url("https://tungu.me/bg.jpg") no-repeat;
  background-size: cover;
  margin: 0 auto;
  background-position: center;
}

.header-title {
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  min-width: 50%;
  padding: 30px;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  border: 3px solid;
  border-top: none;
}

.header-title h1,
.header-title h2 {
  letter-spacing: 0.05em;
}

.header-title h1 {
  font-size: 3.5em;
  text-transform: uppercase;
}

.header-title h2 {
  -ms-transform: translate(0, -50%);
  -webkit-transform: translate(0, -50%);
  transform: translate(0, -50%);
  font-style: oblique;
  font-size: 1.5em;
  overflow: hidden;
  margin: -30px -33px 0 -33px;
  position: absolute;
  width: calc( 100% + 6px);
}

.header-title h2:before,
.header-title h2:after {
  content: "";
  position: absolute;
  width: 100%;
  margin-top: -2px;
  border-top: 3px solid;
  top: 50%;
}

.header-title h2:before {
  -ms-transform: translate(-100%, 0);
  -webkit-transform: translate(-100%, 0);
  transform: translate(-100%, 0);
  margin-left: -30px;
}

.header-title h2:after {
  margin-left: 30px;
}

.title h1 {
  padding: 20px;
}

section {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

section p {
  margin: 10%;
  line-height: 1.5em;
}

section img {
  max-width: 50%;
}

section h1 {
  font-size: 2em;
  margin: 0 0 5px 0;
  font-weight: 100;
}

section h2 {
  font-size: 1em;
  font-weight: 100;
  white-space: pre;
  font-style: italic;
}

.red {
  background-color: #F44336;
}

.pink {
  background-color: #E91E63;
}

.purple {
  background-color: #9C27B0;
}

.deep-purple {
  background-color: #673AB7;
}

.indigo {
  background-color: #2196F3;
}

.blue {
  background-color: #2196F3;
}

.light-blue {
  background-color: #03A9F4;
}

.cyan {
  background-color: #00BCD4;
}

.teal {
  background-color: #009688;
}

.green {
  background-color: #4CAF50;
}

.light-green {
  background-color: #8BC34A;
}

.lime {
  background-color: #CDDC39;
}

.yellow {
  background-color: #FFEB3B;
}

.amber {
  background-color: #FFC107;
}

.orange {
  background-color: #FF9800;
}

.deep-orange {
  background-color: #FF5722;
}

.brown {
  background-color: #795548;
}

.grey {
  background-color: #9E9E9E;
}

.blue-grey {
  background-color: #607D8B;
}

.black {
  background-color: #000000;
}

.white {
  background-color: #FFFFFF;
}

.lgrey {
  background-color: #ececed;
}

.dgrey {
  background-color: #404042;
}

.txt-red {
  color: #F44336;
}

.txt-pink {
  color: #E91E63;
}

.txt-purple {
  color: #9C27B0;
}

.txt-deep-purple {
  color: #673AB7;
}

.txt-indigo {
  color: #2196F3;
}

.txt-blue {
  color: #2196F3;
}

.txt-light-blue {
  color: #03A9F4;
}

.txt-cyan {
  color: #00BCD4;
}

.txt-teal {
  color: #009688;
}

.txt-green {
  color: #4CAF50;
}

.txt-light-green {
  color: #8BC34A;
}

.txt-lime {
  color: #CDDC39;
}

.txt-yellow {
  color: #FFEB3B;
}

.txt-amber {
  color: #FFC107;
}

.txt-orange {
  color: #FF9800;
}

.txt-deep-orange {
  color: #FF5722;
}

.txt-brown {
  color: #795548;
}

.txt-grey {
  color: #9E9E9E;
}

.txt-blue-grey {
  color: #607D8B;
}

.txt-black {
  color: #000000;
}

.txt-white {
  color: #FFFFFF;
}

.txt-lgrey {
  color: #ececed;
}

.txt-dgrey {
  color: #404042;
}

.opacity-0-0 {
  opacity: 0;
}

.opacity-0-1 {
  opacity: 0.1;
}

.opacity-0-2 {
  opacity: 0.2;
}

.opacity-0-3 {
  opacity: 0.3;
}

.opacity-0-4 {
  opacity: 0.4;
}

.opacity-0-5 {
  opacity: 0.5;
}

.opacity-0-6 {
  opacity: 0.6;
}

.opacity-0-7 {
  opacity: 0.7;
}

.opacity-0-8 {
  opacity: 0.8;
}

.opacity-0-9 {
  opacity: 0.9;
}

.opacity-1-0 {
  opacity: 1;
}

.hover-opacity-0-0:hover {
  opacity: 0;
}

.hover-opacity-0-1:hover {
  opacity: 0.1;
}

.hover-opacity-0-2:hover {
  opacity: 0.2;
}

.hover-opacity-0-3:hover {
  opacity: 0.3;
}

.hover-opacity-0-4:hover {
  opacity: 0.4;
}

.hover-opacity-0-5:hover {
  opacity: 0.5;
}

.hover-opacity-0-6:hover {
  opacity: 0.6;
}

.hover-opacity-0-7:hover {
  opacity: 0.7;
}

.hover-opacity-0-8:hover {
  opacity: 0.8;
}

.hover-opacity-0-9:hover {
  opacity: 0.9;
}

.hover-opacity-1-0:hover {
  opacity: 1;
}

.border {
  border-width: 2px;
  border-style: solid;
  padding: 30px;
}

.border-title {
  border-width: 2px;
  border-style: solid;
  padding: 10px 60px;
}

footer {
  width: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: row;
}

footer h3 {
  margin: 10%;
}


/* ICON SCROLL */

.icon-scroll,
.icon-scroll:before {
  position: absolute;
  left: 50%;
}

.icon-scroll {
  width: 40px;
  height: 70px;
  margin-left: -20px;
  bottom: 5%;
  box-shadow: inset 0 0 0 1px #fff;
  border-radius: 25px;
}

.icon-scroll:before {
  content: '';
  width: 8px;
  height: 8px;
  background: #fff;
  top: 8px;
  border-radius: 4px;
  margin-left: -4px;
  -webkit-animation: scroll infinite 1.5s;
  animation: scroll infinite 1.5s;
}

@-webkit-keyframes scroll {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(46px);
    transform: translateY(46px);
  }
}

@keyframes scroll {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(46px);
    transform: translateY(46px);
  }
}


/* END ICON SCROLL */


/* NAVIGATION */

.container {
  -webkit-transition: -webkit-transform 0.5s;
  -webkit-backface-visibility: hidden;
}

.containerOverlay {
  display: none;
  background: rgba(0, 0, 0, .3);
}

.containerOverlay,
.containerOverlay a {
  position: fixed;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.button {
  display: block;
  float: right;
  background: #fff;
  padding: 9px 10px;
  border-radius: 50%;
  font-size: 1.5em;
  -webkit-transition: all 0.3s linear;
  -o-transition: all 0.3s linear;
  -moz-transition: all 0.3s linear;
  -ms-transition: all 0.3s linear;
  -kthtml-transition: all 0.3s linear;
  transition: all 0.3s linear;
}

.button:hover {
  box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0 13px 25px 0 rgba(0, 0, 0, 0.3)
}

nav {
  z-index: 1;
  position: fixed;
  top: 0;
  bottom: 0;
  -webkit-transform: translate3d(-100%, 0, 0);
  -webkit-transition: -webkit-transform 0.5s;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  width: 400px;
  background: #fff;
  box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

nav li {
  display: block;
  padding: 10px 20px;
  border-bottom: 1px solid #eeeeee;
}

nav a {
  text-decoration: none;
  color: #666
}

nav ul li:hover {
  background-color: #03A9F4;
  color: #fff;
}

nav ul li:active {
  background-color: #F44336;
}

nav:target {
  z-index: 4;
  -webkit-transform: translate3d(0, 0, 0);
}

nav:target ~ .container .containerOverlay {
  display: block;
}

nav i {
  margin-right: 5px;
}

.logo-head {
  width: 100%;
  height: 50px;
  background-color: #F44336;
  padding-top: 150px;
}

.logo-txt {
  margin-left: 15px;
  color: #fff;
  font-weight: 600;
  font-size: 2em;
}

.nav1 {
  bottom: 5%;
  right: 5%;
  margin: 0 0 0 0;
  position: fixed;
  z-index: 2;
}


/* END NAVIGATION*/

@media screen and (max-width: 600px) {
  .logo-txt {
    font-size: 1.7em;
    ;
  }
  nav {
    width: 60%;
  }
  .icon-scroll {
    visibility: hidden;
  }
  section {
    flex-wrap: wrap;
    min-width: none;
  }
  footer {
    flex-wrap: wrap;
    min-width: none;
  }
  .white {
    border-bottom: 1px solid #eee;
  }
}
              
            
!

JS

              
                //Heading inspiration from : https://codepen.io/abergin/pen/qEGyJa

$(document).ready(function() {
			$('.scrollTo').click( function() { 
				var page = $(this).attr('href'); 
				var speed = 1200; 
				$('html, body').animate( { scrollTop: $(page).offset().top }, speed );
				return false;
			});
		});
              
            
!
999px

Console