cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              .row
  .nav.active
    %a.icon
      .icon-item.icon-item--1
      .icon-item.icon-item--2
      .icon-item.icon-item--3
      .icon-item.icon-item--4
    %ul.nav-menu
      %li.bucket.ad1
        .bucket-media
        .bucket-content
          .bucket-item
          .bucket-item
      %li.bucket.ad2
        .bucket-media
        .bucket-content
          .bucket-item
          .bucket-item
      %li.bucket.ad3
        .bucket-media
        .bucket-content
          .bucket-item
          .bucket-item
      %li.bucket.ad4
        .bucket-media
        .bucket-content
          .bucket-item
          .bucket-item
      %li.bucket.ad5
        .bucket-media
        .bucket-content
          .bucket-item
          .bucket-item
  .content
    %p Main Content
            
          
!
            
              /* Base Variables */

$b-space: 20px
$b-space-s: $b-space / 2
$b-maxWidth: 900px
$b-radius: 4px
  
/* Base */

html
  width: 100%
  height: 100%
body
  background: #ddd
  color: #fff
  width: 100%
  height: 100%
  
/* Layout */
  
.row
  background: #ececec
  display: flex
  flex-grow: 1
  align-items: stretch
  align-content: stretch
  height: 100%
  
/* Bucket */

.bucket
  display: flex
  opacity: 0
  transform: translateY(-10px)
  padding: $b-space
  border-bottom: 2px solid darken(#9A55A1,20%)
  
  &:last-child
    border-bottom: 0
  
.active
  .bucket.ad1
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    
  .bucket.ad2
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 0.5s
    
  .bucket.ad3
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 1s
    
  .bucket.ad4
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 1.5s
  .bucket.ad5
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 2s
    
.bucket-media
  background: #E9B1D2
  height: 30px
  width: 30px
  margin-right: 10px
  border-radius: $b-radius
  &:hover
    animation: pulse 0.5s
  
.bucket-content
  flex-grow: 1
  
.bucket-item
  background: #FFC609
  padding: 5px
  flex-direction: column
  margin-bottom: 10px
  border-radius: $b-radius
 
  &:last-child
    margin-bottom: 0
  
/* Navagation */

.nav
  display: flex
  flex-basis: 0%
  background: #9A55A1
  position: relative
  
.nav.active
  flex-basis: 25%
     
.nav-menu
  display: flex
  flex-direction: column
  flex-grow: 1
  list-style-type: none
  padding: 0
  margin: 0
  margin-top: 35px
  
.content
  flex-grow: 1
  flex-basis: fill
  background: darken(#9A55A1,10%)
  text-align: center
  
/* Icon */

.icon
  color: #333333
  position: absolute
  top: 9px
  left: $b-space
  transition: all 0.5s
  width: 24px
  height: 24px
  transform: rotate(0deg)
  cursor: pointer
  
.icon-item
  display: block
  height: 2px
  width: 100%
  background: #fff
  opacity: 1
  transform: rotate(0deg)
  position: absolute
  transition: opacity 0.2s, transform 0.5s
  
.icon-item--1
  top: 0px
  
.icon-item--2,
.icon-item--3
  top: 10px
  
.icon-item--4
  top: 20px
  
.active
  .icon
    color: #1b95fd
    animation: ring 0.3s linear, slideRight 0.55s forwards
    
  .icon-item--1,
  .icon-item--4
    opacity: 0
    
  .icon-item--2
    transform: rotate(45deg)
  .icon-item--3
    transform: rotate(-45deg)
    
/* Tools */

.dn
  display: none
  
.hidden
  opacity: 0
  visibility: hidden
    
/* Animations */

@keyframes fadeIn
  from
    opacity: 0
  to
    opacity: 1

@keyframes slideDown
  0%
    transform: translateX(-10px)
  100%
    transform: translateX(0px)
  
@keyframes pulse
  0%,100%
    transform: scale(1)
  50%
    transform: scale(1.3)
            
          
!
            
              $('.icon').on 'click', ->
   $('.nav').toggleClass('active')
   $('.nav-menu').toggleClass('hidden') 
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console