Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="check">
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" width="61" height="52" viewBox="0 0 61 52" class="check-icon">
    <path d="M56.560,-0.010 C37.498,10.892 26.831,26.198 20.617,33.101 C20.617,33.101 5.398,23.373 5.398,23.373 C5.398,23.373 0.010,29.051 0.010,29.051 C0.010,29.051 24.973,51.981 24.973,51.981 C29.501,41.166 42.502,21.583 60.003,6.565 C60.003,6.565 56.560,-0.010 56.560,-0.010 Z" id="path-1" class="cls-2" fill-rule="evenodd"/>
  </svg>
</div>
              
            
!

CSS

              
                @import "compass/css3";

$size-icon: 136px;
$background-body: #fff;

*, *:before, *:after {
  @include box-sizing(border-box);
}

body {
  background: $background-body;
}

.check {
  width: $size-icon;
  height: $size-icon;
  background: #e5e5e5;
  @include border-radius(50%);
  position: absolute;
  top: 50%;
  left: 50%;
  @include transform(translateX(-50%) translateY(-50%));
  @include box-shadow(0px -4px 4px 0px rgba(255, 255, 255, 0.75), inset 0px 4px 4px 0px rgba(0, 0, 0, 0.08));
  cursor: pointer;
  
  &:before {
    content: "";
    background: $background-body;
    position: absolute;
    @include border-radius(50%);
    top: 9%;
    left: 9%;
    right: 9%;
    bottom: 9%;
    @include box-shadow(0px 4px 4px 0px rgba(0, 0, 0, 0.08));
  }
  
  &:after {
    content: "";
    position: absolute;
    @include border-radius(50%);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-color: #60b247;
    border-width: 0;
    border-style: solid;
  }
  
  .check-icon {
    position: absolute;
    z-index: 3;
    top: 31%;
    left: 28%;
    width: 45%;
    fill: #e5e5e5;
  }
  
  
  &.active {
    &:after {
      @include transition(0.1s ease-out all);
      border-width: ($size-icon / 2);
    }
    
    .check-icon {
      fill: #fff;
      @include animation(bounce 0.2s);
      @include animation-delay(0.08s);
    }
  }
  
}


@include keyframes('bounce') {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
              
            
!

JS

              
                $('.check').on('click', function(){
  $(this).toggleClass('active');
});
              
            
!
999px

Console