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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens. You can view all of your templates, or learn more in the documentation.

Screenshot

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

Uploading

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <!DOCTYPE html>
<html>
<head>
  <title>Responsive Animated Sidebar Menu</title>
  <script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>
  <link rel="stylesheet" href="style.css">
<script>
  function openSlideMenu(){
    document.getElementById('menu').style.width = '250px';
    document.getElementById('content').style.marginRight = '250px';
  }
  function closeSlideMenu(){
    document.getElementById('menu').style.width = '0';
    document.getElementById('content').style.marginRight = '0';
  }
</script>
</head>
<body>

  <div id="content">
    <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Explicabo aut exercitationem ratione perferendis provident quaerat, vitae magni soluta molestias, saepe at pariatur inventore minima distinctio neque! Ut ab facilis tempora.
    Distinctio doloremque aperiam minima laudantium soluta alias quam quod impedit voluptatibus tenetur, voluptatum reiciendis corrupti quibusdam neque molestiae odio quae maxime perspiciatis voluptates ipsum fuga illum nulla eaque provident? Repellendus.
    Asperiores dolore saepe natus totam placeat provident est molestias nemo, perspiciatis quis! Rerum adipisci, sint, nam eaque rem nemo et, minima voluptas quas illum dolor ipsam ullam beatae atque veritatis.
    Cupiditate harum voluptate vero obcaecati iure odit aspernatur officia qui ratione quos quasi fugit minima saepe quia nulla, debitis deleniti dolorum vitae excepturi libero at dolore cumque. Nulla, quos provident.
    Minima reprehenderit ullam ea sit velit mollitia culpa iste eum consequatur corrupti est odit, at, harum aliquam eius, voluptatem ad? Nemo veritatis consectetur fugit laudantium tempore quod nobis, nihil fugiat.
    Non labore, minima quidem magni quas et architecto. Beatae asperiores ex odit quod quibusdam fugiat excepturi minus expedita cumque veniam ipsa hic velit, voluptatum dicta nobis accusamus. At, ex expedita.
    Repellat atque numquam eveniet optio, velit praesentium suscipit ut placeat enim quos, veritatis facilis soluta dolores officia dolore sapiente expedita adipisci. Eos rem accusamus aliquam odit saepe iste expedita veritatis?
    Voluptates ipsam corrupti quam assumenda natus necessitatibus inventore quasi velit maiores, iure voluptatibus, debitis quibusdam in tempora? Quis, maiores nemo iusto suscipit repudiandae eum in nesciunt asperiores molestiae eaque eius!
    Est, tempora eos tempore nihil voluptatum alias in perferendis assumenda ipsum amet odit minima. Eius totam quia atque dolor quos minima aut perspiciatis aspernatur maxime, consequuntur dolorem, tenetur accusantium unde?
    Et obcaecati expedita repellendus iste ipsum pariatur fugit assumenda tempore esse mollitia, tenetur commodi at ut provident accusamus sed vel quos rerum aliquid architecto quis. Ut exercitationem officiis temporibus error?
    Perspiciatis amet itaque minima! Fuga delectus beatae dicta. Culpa dolorum dolores in voluptatibus delectus adipisci quisquam atque eius modi blanditiis dolore quibusdam quo aliquid dignissimos qui quas, repellat temporibus soluta?
    Cum quibusdam porro debitis dolorem voluptate obcaecati ipsa cumque, voluptatum fugit culpa. Modi consequatur hic voluptatibus fuga aliquid et voluptas dolores laudantium quaerat recusandae culpa corporis, corrupti iure porro deserunt.
    Doloremque sit iusto quam perspiciatis nihil dolorum, adipisci iure illo architecto deserunt at possimus. Iusto quos delectus odio impedit quidem, sint architecto corrupti non animi, perspiciatis reprehenderit aperiam enim laborum?
    Explicabo, labore, cupiditate non dolor consequuntur deleniti similique iusto dicta, illum quas aliquam suscipit voluptates magnam provident deserunt ratione quibusdam enim mollitia porro voluptatum praesentium fuga! Minima exercitationem magni saepe.
    Fugit unde consequatur iste tenetur veritatis quas facilis corporis quisquam aspernatur. Beatae, debitis ut minus aspernatur eum similique repellendus excepturi veritatis aperiam dicta numquam velit totam officiis soluta vitae nisi?
    Veritatis reprehenderit rem, voluptate sint provident vel ullam, enim alias maxime in laborum sunt ad quam tempora perferendis? Doloribus totam deleniti aut blanditiis suscipit corporis dignissimos minima, recusandae dicta et!
    Perspiciatis excepturi a sequi reprehenderit totam officia mollitia voluptates provident obcaecati explicabo similique quas nesciunt molestiae quasi, perferendis neque repellat dolores ea sint praesentium, officiis velit cum recusandae at. Tempora.
    Corporis omnis commodi aut soluta eum provident laboriosam velit rem voluptatum aperiam suscipit eveniet libero voluptatem eos dolores ut iste amet, tempora molestiae vero. Minus laborum iure corporis. Debitis, voluptatum.
    Facilis, dolorem! Praesentium exercitationem adipisci odit quod possimus mollitia nemo consequatur ducimus minima repellendus. Doloremque laboriosam, facilis quibusdam deserunt illo mollitia, fuga aperiam repudiandae eaque quis voluptatum dolor earum cum.
    Expedita nam excepturi facere repellat tempora reprehenderit eius cupiditate, sequi dolore nostrum perspiciatis maxime iure assumenda aliquid id nisi ab reiciendis aspernatur quisquam repudiandae adipisci. Temporibus animi voluptates dolor neque.</p>

    <div style="width: 200px; height: 700px; background-color: red; margin-bottom: 20px;"></div>

    <span class="slide">
      <a href="#" onclick="openSlideMenu()">
        <i class="fas fa-bars"></i>
      </a>
    </span>

    <div id="menu" class="nav">
      <a href="#" class="close" onclick="closeSlideMenu()">
        <i class="fas fa-times"></i>
      </a>
      <a href="#">Home</a>
      <a href="#">About</a>
      <a href="#">Services</a>
      <a href="#">Portfolio</a>
      <a href="#">Contact</a>
    </div>

    

    

  </div>


</body>
</html>


















              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Alegreya+Sans:800');

body {
	font-family: 'Alegreya Sans', sans-serif;
	overflow-x: hidden;
}
.nav {
	height: 100%;
	width: 0;
	position: fixed;
	z-index: 1;
	top: 0;
	right: 0;
	background-color: #111;
	opacity: .9;
	overflow-x: hidden;
	padding-top: 60px;
	transition: 0.7s;
}
.nav a {
	display: block;
	padding: 20px 30px;
	font-size: 25px;
	text-decoration: none;
	color: #ccc;
}
.nav a:hover {
	color: #fff;
	transition: 0.4s;
}
.nav .close {
	position: absolute;
	top: 0;
	right: 22px;
	margin-left: 50px;
	font-size: 30px
}
.slide a {
	color: #000;
	font-size: 36px;
}
#content {
	padding: 20px;
	transition: margin-left 0.7s;
	overflow: hidden;
	width: 100%;
}























              
            
!

JS

              
                
              
            
!
999px

Console