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.

              <svg xmlns="http://www.w3.org/2000/svg" style="display: none">
  <symbol id="checkmark" viewBox="0 0 24 24">
    <path stroke-linecap="round" stroke-miterlimit="10" fill="none"  d="M22.9 3.7l-15.2 16.6-6.6-7.1">

<div class="form-container">
  <p>A custom checkbox :D</p>
  <div class="promoted-checkbox">
    <input id="tmp" type="checkbox" class="promoted-input-checkbox"/>
    <label for="tmp">
      <svg><use xlink:href="#checkmark" /></svg>      
      Save recipient    
              $brand: #0080d3;
$grey-25: #e6e6e6;
$grey-5: #fcfcfc;

*, *:before, *:after {
  box-sizing: border-box;

.form-container {
  padding: 1rem;
  margin: 2rem auto;
  background-color: $grey-5;
  border: 1px solid $grey-25;
  width: 50%;

/* HTML5 Boilerplate accessible hidden styles */
.promoted-input-checkbox {
  border: 0; 
  clip: rect(0 0 0 0); 
  height: 1px; margin: -1px; 
  overflow: hidden; 
  padding: 0; 
  position: absolute; 
  width: 1px;

.promoted-checkbox {
  input:checked + label > svg {
    // Firefox doesn't render svg's that is loading with the use tag if its been set to display: none and then toggled to display: block, so you have to use tricks like this to get it to render again:
    height: 24px;
    animation: draw-checkbox ease-in-out 0.2s forwards;
  label:active::after {
    background-color: $grey-25;
  label {
    color: $brand;
    line-height: 40px;
    cursor: pointer;
    position: relative;
    &:after {
      content: "";
      height: 40px;
      width: 40px;
      margin-right: 1rem;
      float: left;
      border: 2px solid $brand;
      border-radius: 3px;
      transition: 0.15s all ease-out;      
  svg {
    stroke: $brand;
    stroke-width: 2px;
    height: 0; //Firefox fix
    width: 24px;
    position: absolute;
    left: -48px;
    top: -4px;
    stroke-dasharray: 33; //Firefox fix

@keyframes draw-checkbox {
  0% {
    stroke-dashoffset: 33;
  100% {
    stroke-dashoffset: 0;

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.


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