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 Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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="thumb-holder">
  <h1>Vote</h1>
  <input type="radio" value="good" name="user vote" id="good"><label for="good"></label>
  <input type="radio" value="bad" name="user vote" id="bad"><label for="bad"></label>
</div>

<div class="slider-holder">
  <h2>Slide</h2>
  <p class="status_slider">
    <input type="checkbox" checked id="r3"><label for="r3"></label>
  </p>
</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto:300);
body {
  color: #fff;
  font-family: 'Roboto', sans-serif;
}

h2 {
  color: #000;
  text-align: center;
}


/*THUMBS UP------------------------------------*/

.thumb-holder {
  background: #000;
  text-align: center;
  padding: 1em 0;
  margin-top: 1em;
}

#good,
#bad {
  display: none;
}

#good + label {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: url(http://andrewjmacklin.com/img/codepen/vote-sprite.png) no-repeat 0px -60px;
  margin-right: 20px;
  cursor: pointer;
}

#good:checked + label {
  background-position: 0px 0px;
}

#bad + label {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: url(http://andrewjmacklin.com/img/codepen/vote-sprite.png) no-repeat -60px -60px;
  cursor: pointer;
}

#bad:checked + label {
  background-position: -60px 0px;
}


/*SLIDER--------------------------------------------*/

.slider-holder {
  width: 140px;
  margin: 1em auto;
}

.status_slider input {
  max-height: 0;
  max-width: 0;
  opacity: 0;
}

.status_slider input + label {
  display: block;
  position: relative;
  box-shadow: inset 0 0 2px 5px #000;
  border: 1px solid #000;
  text-indent: -5000px;
  height: 40px;
  width: 140px;
  background: url(http://andrewjmacklin.com/img/codepen/input-slider.png);
  cursor: pointer;
}

.status_slider input + label:before {
  content: "";
  position: absolute;
  display: block;
  height: 40px;
  width: 70px;
  top: 0;
  left: 0;
  transition: .25s ease-in-out;
}

.status_slider input + label:after {
  content: "";
  position: absolute;
  display: block;
  height: 40px;
  width: 70px;
  top: 0;
  left: 70px;
  background: #cf1704 url(http://andrewjmacklin.com/img/codepen/input-slider-off.png);
  transition: .25s ease-in-out;
}

.status_slider input:checked + label:before {
  width: 50px;
}

.status_slider input:checked + label:after {
  left: 0px;
  background: #4e9608 url(http://andrewjmacklin.com/img/codepen/input-slider-on.png);
}
            
          
!
999px
Loading ..................

Console