Pen Settings



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


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


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.


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.


                <div id="pattern" class="pattern">
    <div class="offcanvas-top">
  		<div class="o-content">
				<p>Here is more content. This could be related items, navigation or other content you feel is conducive to this type of treatment.</p>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis nisi et dui placerat ornare. Maecenas molestie lacus lobortis libero lacinia sed scelerisque lectus congue. Mauris dignissim nisi a ante laoreet et ullamcorper ligula ullamcorper. In hac habitasse platea dictumst. In nisi odio, tempor in viverra vitae, mollis ac tortor. Sed a rhoncus leo. Maecenas ac dui elit, tristique dapibus nisl. Suspendisse feugiat porta ligula, auctor posuere lorem vulputate et.</p>
	<!--End Pattern HTML-->
<div class="container">	
		<!--Pattern Description-->
		<section class="pattern-description">
			<h1>Off-Canvas Top</h1>
			<p>More content or navigation can be displayed off-canvas above the core content. </p>
				<li>Saves space for core content.</li>
				<li><strong>JS Dependency</strong> - Not necessarily a con, but ensure that off-canvas content is still accessible for users with poor/no JS support</li>
				<li><strong>Animation Performance</strong> - Platforms, especially mobile platforms, vary greatly in how well they treat animations. Keep this in mind.</li>
				<li><a href="">Off Canvas Multi-Device Layout</a></li>
				<li><a href="">Off Canvas Multi-Device Layouts</a></li>
				<li><a href="">Off-Canvas demo by Jason Weaver</a></li>
		<!--End Pattern Description-->
		<footer role="contentinfo">   
				<nav id="menu">
					<a href="">&larr;More Responsive Patterns</a>
		<!--End Footer-->



                .offcanvas-top {
  position: relative;
  overflow: hidden;
  height: 3.2em;
  -webkit-transition: height 0.5s ease-out; 
  -moz-transition: height 0.5s ease-out;  
  -o-transition: height 0.5s ease-out; 
  transition: height 0.5s ease-out;
} {
  height: 13.6em;
.o-content {
  width: 100%;
  position: absolute;
  bottom: 0;
  padding: 1em 1em 2.5em;
.crumbs li a {
  display: block;
  padding: 1em;
  border-bottom: 1px solid #000;
.crumbs li:last-child a {
  border-bottom: 0;
#trigger {
  position: absolute;
  bottom: 0;
  right: 0;
  display: block;
  font-size: 1em; 
  padding: 0 1em 1em;


      var $container = $('.offcanvas-top'),
				$cHeight = $('.o-content').outerHeight();
			$(document).ready(function() {
			function buildCanvas() {
				$('<a href="#" id="trigger">More +</a>').appendTo($container);

				$('#trigger').bind('click', function(e) {
					var $this = $(this);
					if($container.hasClass('active')) {
						$this.text('Hide -');
					} else {
						$this.text('More +');

			$(window).resize(function() { //On Window resizeBy(
				$cHeight = $('.o-content').outerHeight();