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="options">
  <h2>Animated and styled radio buttons<br><small>(with no extra elements)</small></h2>
  <input name="option" type="radio" id="click" class="hide" checked>
  <label for="click">Click Me</label>

  <input name="option" type="radio" id="touch" class="hide">
  <label for="touch">Touch Me</label>

  <input name="option" type="radio" id="love" class="hide">
  <label for="love">Love Me</label>
              $spacing-unit: 16px;
$half-spacing-unit: $spacing-unit / 2;
$quarter-spacing-unit: $spacing-unit / 4;

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

html {
  width: 100%;
  height: 100%;
  position: relative;
  background: #222 url(https://i.cloudup.com/B-nGjfTv8k.jpg) no-repeat;
  background-image: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), url(https://i.cloudup.com/B-nGjfTv8k.jpg);  
  background-size: cover;
.options {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #ddd;
  padding: $spacing-unit * 3;
  font-family: 'Open Sans', sans-serif;
  text-align: center;

  input {
    display: none;
  // .options > label
  > label {
    display: inline-block;
    position: relative;
    margin-right: $spacing-unit;
    padding-left: $spacing-unit + $half-spacing-unit;
    cursor: pointer;

    // .options > label:before
    // this creates the outer circle for faux radio button
    &:before {
      content: "";
      display: block;
      position: absolute;
      width: 16px;
      height: 16px;
      left: 0;
      top: 50%;
      margin-top: -8px;
      border: 1px solid #fff;
      border-radius: 8px;

    // .options > label:after
    // this creates the inner circle for active faux radio button
    &:after {
      content: "";
      display: block;
      position: absolute;
      width: 0;
      height: 0;
      top: 50%;
      left: 8px;
      margin-top: 0;
      background: #fff;
      border-radius: 4px;
      transition: .2s ease-in-out;

  // .options :checked + label:after
  :checked + label {
    &:after {
      height: 8px;
      width: 8px;
      margin-top: -4px;
      left: 4px;

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