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.

            
              
  <h1>Who would win in a fight to the death?</h1>


<div class="wrap">
  


<div class="radio-group">
  <input id="opt_1" class="radio-group__option" type="radio" name="opt" checked="checked">
  <label class="radio-group__label" for="opt_1">
    James Bond
  </label>
  
  <input id="opt_2" class="radio-group__option" type="radio" name="opt">
  <label class="radio-group__label" for="opt_2">
    Jason Bourne
  </label>
</div>
    
  <br/>
  
  <div class="log">
    Hello log.
  </div>

</div>



<script class="cssdeck" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
            
          
!
            
              @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,700);

$toggle-inactive-color: #4F5167;
$toggle-active-color: #389E29;
$trans-duration-base: 250ms;

body {
  background: #2A2A34;
}

h1 {
  font-family: "Open Sans", sans;
  font-weight:300;
  text-align:center;
  color:rgba(255,255,255,0.5);
  margin-top: 10%;
}
  
.wrap {
  margin: 5% 20px 20px -125px;
  overflow: hidden;
  position: absolute;
  left: 50%;
  top: 20%;

}

.log {
  color: #DDD;
  margin-top: 20%;
  padding: 0 5px;
  opacity: .3;
  transition: all 250ms;
  text-align: center;
  display: none;
}

.radio-group {  
  width: 250px;
  display: table;
  table-layout: fixed;
  border-spacing: 0;
  border-collapse: separate;
  
}

.radio-group__label {
  display: table-cell;
  height: 28px;
  padding: 5px;
  vertical-align: middle;
  text-align: center;
  position: relative;
  border: 1px solid $toggle-inactive-color;
  border-style: solid none solid solid;
  border-radius: 5px 0 0 5px;
  color: $toggle-inactive-color;
  @include transition(border $trans-duration-base, color $trans-duration-base);
  cursor: pointer;
}

.radio-group__label + input + .radio-group__label {
  border-radius: 0 5px 5px 0;
  border-style: solid solid solid none;
}
  
.radio-group__label + input + .radio-group__label:before {
  content: " ";
  display: block;
  position: absolute;
  top:-1px;
  width: 100%;
  height: 100%;
  border: 1px solid $toggle-active-color;
  border-radius: 5px 0 0 5px;
  transform: translate3d(-103%,0,0);
  transition: all $trans-duration-base;
  
}  

.radio-group__label + input:checked + .radio-group__label:before {
  border-radius: 0 5px 5px 0;
  transform: translate3d(-6px,0,0);
}
  
.radio-group__option:checked + label {  
  color: $toggle-active-color;
  
}

.radio-group__option {  
  display: none;
  
}

            
          
!
            
              // from - https://cssdeck.com/labs/ql8jmgjt 

function updateLog() {
  var one = $("#opt_1:checked").val() ? "On" : "Off"
  var two = $("#opt_2:checked").val() ? "On" : "Off"
  $(".log").html("Everyone: " + one + "<br/>Just for me: " + two)
}

$(".radio-group__option").change(updateLog)
            
          
!
999px
Loading ..................

Console