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.

            
              <div class="cntr">
    <label for="cbx" class="label-cbx">
      <input id="cbx" type="checkbox" class="invisible">
      <div class="checkbox">
        <svg width="20px" height="20px" viewBox="0 0 20 20">
          <path d="M3,1 L17,1 L17,1 C18.1045695,1 19,1.8954305 19,3 L19,17 L19,17 C19,18.1045695 18.1045695,19 17,19 L3,19 L3,19 C1.8954305,19 1,18.1045695 1,17 L1,3 L1,3 C1,1.8954305 1.8954305,1 3,1 Z"></path>
          <polyline points="4 11 8 15 16 6"></polyline>
        </svg>
      </div>
      <span>Checkbox</span>
    </label>
  </div>
            
          
!
            
              body
  font-family: Avenir
  font-size: 16px

.label-cbx
  user-select: none
  cursor: pointer
  margin-bottom: 0
  input:checked
    & + .checkbox
      border-color: #20C2E0
      svg
        path
          fill: #20C2E0
        polyline
          stroke-dashoffset: 0
  &:hover
    .checkbox
      svg
        path
          stroke-dashoffset: 0

  .checkbox
    position: relative
    top: 2px
    float: left
    margin-right: 8px
    width: 20px
    height: 20px
    border: 2px solid #C8CCD4
    border-radius: 3px
    svg
      position: absolute
      top: -2px
      left: -2px
      path
        fill: none
        stroke: #20C2E0
        stroke-width: 2
        stroke-linecap: round
        stroke-linejoin: round
        stroke-dasharray: 71px
        stroke-dashoffset: 71px
        transition: all .6s ease
      polyline
        fill: none
        stroke: #FFF
        stroke-width: 2
        stroke-linecap: round
        stroke-linejoin: round
        stroke-dasharray: 18px
        stroke-dashoffset: 18px
        transition: all .3s ease

  > span
    pointer-events: none
    vertical-align: middle

.cntr
  position: absolute
  top: 45%
  left: 0
  width: 100%
  text-align: center

.invisible
  position: absolute
  z-index: -1
  width: 0
  height: 0
  opacity: 0
            
          
!
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