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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div class="sidebar-contact">
    <div class="toggle"></div>
    <h2>Contact Us</h2>
    <form action="">
      <input type="text" placeholder="Name">
      <input type="email" placeholder="Email">
      <input type="rel" placeholder="Phone Number">
      <textarea placeholder="Message"></textarea>
      <input type="submit" value="Send">
    </form>
  </div>
  <div class="banner"></div>
  <div class="content">
    <h2>What is Loren Ipsum</h2>
    <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Vel pariatur alias ullam dolores provident iusto. Inventore maxime, deleniti delectus corporis incidunt harum voluptates quidem saepe, atque nemo sit? Corrupti dolorum animi facilis excepturi saepe dolore ipsa id perferendis ipsum cumque, asperiores doloremque ullam nemo facere reiciendis, ex velit labore quaerat accusamus suscipit sit? Suscipit perferendis asperiores molestiae tempora earum sunt! Quasi quos cupiditate illo quaerat, sequi aliquam at maiores error, sapiente aperiam aliquid dolores provident excepturi voluptas. Numquam illo iusto soluta alias eligendi, amet enim blanditiis deserunt labore? Recusandae, quisquam nihil harum cumque a adipisci quod eos perferendis eligendi sequi?</p>
    <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Explicabo, recusandae at nulla ut, cupiditate aut aspernatur deleniti animi nisi reiciendis consequatur eum, asperiores voluptas incidunt sunt optio! Odio ex provident quod dicta tenetur voluptatem corrupti minima quos placeat! Quo nobis dignissimos nisi optio commodi reprehenderit, dolor qui vel, eum laborum dolorum magnam possimus cumque nulla dolorem quaerat consectetur? Vero reprehenderit quas obcaecati, sunt eius numquam ratione impedit voluptas quod magnam inventore in quidem suscipit qui aliquam consequatur non debitis enim amet odio ipsam repellat? Labore iusto, ab architecto ipsa odit reprehenderit! Architecto officiis libero excepturi! Molestias fugit repellat dolore labore.</p>
 <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati ea architecto in cum, voluptate culpa perferendis accusamus fugit, impedit consequuntur ullam sunt ipsum dolorem ducimus ratione minima. Eveniet ullam quo beatae praesentium fugiat obcaecati vitae excepturi quas sequi possimus, tenetur alias laborum id cumque sed tempora, distinctio error dolorem, aliquam odio? Atque nisi tenetur iste repellendus amet eius provident neque, quae, tempore temporibus nihil dignissimos. Doloremque officia molestiae, soluta vel dolorum fugiat! Doloribus obcaecati commodi iste, totam laudantium voluptatum culpa error nemo necessitatibus quisquam porro labore reprehenderit magni dolor facilis cumque ab asperiores dolorum. Doloribus asperiores tempore blanditiis optio quos.</p>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut natus blanditiis vel, expedita laboriosam quia praesentium velit non? Earum ad ea sed corporis natus excepturi hic itaque facilis esse quod temporibus neque distinctio, non voluptatem consequatur ratione! Minus dolor officia laboriosam temporibus quis reiciendis? Excepturi, aut magnam! Dicta nulla harum numquam voluptatem, consequuntur mollitia delectus officia, recusandae incidunt praesentium aperiam accusamus fuga iusto officiis amet nesciunt inventore, autem molestiae. Tempora excepturi ullam nam error similique sunt illo possimus odit? Officia, deleniti. Accusamus, expedita laboriosam officia labore a dicta ex at? Dicta consequatur harum necessitatibus voluptatum excepturi dolor reprehenderit delectus velit.</p>
  </div>
</body>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

* {
  box-sizing: border-box;
}

body  {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.4;
}

.banner {
  width: 100%;
  height: 100vh;
  background: url('https://images.pexels.com/photos/547114/pexels-photo-547114.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260');
  background-size: cover;
  background-attachment: fixed;    
}

.content {
  padding: 50px 100px;
}

.content h2 {
  margin: 0 0 20px;
  padding: 0;
  font-size: 30px;
}

.content p {
  font-size: 18px;
}

.sidebar-contact {
  position: fixed;
  transform: translateY(-50%);
  top: 50%;
  left: -350px;
  width: 350px;
  height: auto;
  padding: 40px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0, .5);
  transition: 0.5s ease-in-out;
}

.sidebar-contact.active {
  left: 0;
}

.sidebar-contact input,
.sidebar-contact textarea{
  width: 100%;
  height: 36px;
  padding: 5px;
  margin-bottom: 10px;
  border: 1px solid rgba(0,0,0, .5);
  outline: none;
}

.sidebar-contact textarea {
  height: 60px;
  resize: none;
}

.sidebar-contact input[type="submit"] {
  background: #00bcd4;
  color: #fff;
  cursor: pointer;
  border: none;
  font-size: 18px;
  
}
.sidebar-contact h2 {
  margin: 0 0  20px;
  padding: 0;
}

.toggle {
  position: absolute;
  top: 0;
  right: -48px;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
  background: #f00;
}

.toggle::before {
  content: "\f003";
  font-family: fontAwesome;
  color: #fff;
  font-size: 18px;
}

.toggle.active::before {
  content: '\f00d';
}
              
            
!

JS

              
                $(document).ready(function(){
  $('.toggle').click(function() {
    $('.sidebar-contact').toggleClass('active');
    $('.toggle').toggleClass('active');
    
  })
  
});
              
            
!
999px

Console