cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

              - for i in 0..5
  input[type="radio" id="li#{i}" name="foo" checked=i===1]

              $n: 4
$t: 0.33s
$height: 36px
$width: 108px
$margin: 14px

// derived
$fullheight: $n * $height + ($n + 1) * $margin
$fullwidth: $width + $margin + $fullheight

  background: #ff6461

  position: absolute
  left: 50%
  top: 50%
  height: $fullheight
  width: $fullwidth
  margin: $fullheight/-2 $fullwidth/-2

  visibility: hidden

  position: absolute
  left: 0
  right: $fullwidth - $width
  background: white
  cursor: pointer

  @for $i from 0 to $n
    #li#{$i} + &
      $top: $i * $height + ($i + 1) * $margin
      top: $top
      bottom: $fullheight - $top - $height
  \:checked + &
    left: $width + $margin
    right: 0
    top: $margin !important
    bottom: $margin !important
    transition: left $t $t, right $t $t, top $t $t*2, bottom $t $t*2
  transition: left $t $t, right $t $t, top $t, bottom $t
Loading ..................