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 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


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.


              <nav id="layered-nav">
  <div class="main option">
  <div class="section primary-section option">
  <div class="section secondary-section option">
  <div class="section tertiary-section option">
  <div class="primary red option">
  <div class="primary yellow option">
  <div class="primary blue option">
  <div class="secondary green option">
  <div class="secondary orange option">
  <div class="secondary purple option">
  <div class="tertiary red-orange option">
  <div class="tertiary yellow-orange option">
  <div class="tertiary red-purple option">
  <div class="tertiary blue-purple option">
  <div class="tertiary blue-green option">
  <div class="tertiary yellow-green option">

<div id="back-button">



              /* Set the containing element to flex
 * with a flow of row wrap.
#layered-nav {
  display: flex;
  flex-flow: row wrap;

/* Everything below this comment exists 
 * purely for styling.

.option {
  height: 150px;
  width: 150px;
  color: #fff;
  text-align: center;
  border-radius: 50%;
  margin: 10px;

#back-button {
  margin-left: 50px;

h2 { padding-top: 40px; }

.section { background-color: #a9a9a9; }

/* Colors */
.red { background-color: red; }
.yellow { background-color: yellow; }
.blue { background-color: blue; }
.orange { background-color: orange; }
.green { background-color: green; }
.purple { background-color: purple; }
.red-orange { background-color: #FE6501; }
.yellow-orange { background-color: #FECC01; }
.red-purple { background-color: #B701DB; }
.blue-purple { background-color: #5601FF; }
.blue-green { background-color: #00CDCD; }
.yellow-green{ background-color: #3EFF01; }



              // First, we create a function to hide everything.
hideAll = function() {
  $( '.option' ).hide();

// Next we set the default behavior
$( document ).ready( function() {
  $( '.main' ).show();

// Then we set the behavior of our reset button
$( '#back-button' ).click( function() {
  $( '.main' ).show();

// Lastly, we set the click behavior of all of our options
$( '.main' ).click( function() {
  $( '.section' ).show();

$( '.primary-section' ).click( function() {
  $( '.primary' ).show();

$( '.secondary-section' ).click( function() {
  $( '.secondary' ).show();

$( '.tertiary-section' ).click( function() {
  $( '.tertiary' ).show();