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>
  <a href="#">submit</a>
  <a class="loading" href="#">loading</a>
  <svg viewBox="0 0 240 220">
    <rect id="middle" x="20" y="100" width="200" height="60" rx="30"></rect>
    <path id="top" d="
      M 60,100
      L 50,100
      C 33.4357078,100 20,113.427814 20,130
      L 20,130
      C 20,146.568541 33.4331197,160  50,160
      L190,160
      C206.570288,160 220,146.572314 220,130
      L220,100
      C220,-60 180, 80 160,100
      C140,120 100,160 100,160
    "></path>
    <path id="bottom" d="
      M180,160
      L190,160
      C206.564295,160 220,146.572186 220,130
      L220,130
      C220,113.431458 206.56688,100 190,100
      L 50,100
      C33.4297125,100 20,113.435296 20,130
      C20,130 20,120 20,140
      C20,220 180,200 120,140
      C100,120 80,100 80,100
    "></path>
  </svg>
  <a class="feedback" href="#"></a>
</div>
            
          
!
            
              @import "nib"

easeInOutSine = cubic-bezier(0.445, 0.050, 0.550, 0.950)
easeOutBack   = cubic-bezier(0.250,-0.250, 0.750, 1.250)

body
html
div
  background #292A38
  margin 0
  padding 0
  position relative
  width 100%
  height 100%
  text-align center

a
  transition color .5s
  font-family "Helvetica Neue", Helvetica, Arial, sans-serif
  font-size 20px
  top 100px
  font-weight 100
  display block
  position absolute
  z-index 3
  text-decoration none
  width 200px
  left 50%
  transform translateX(-50%)
  text-align center
  color rgba(#fff, 1)
  height 60px
  line-height 60px
  border-radius 30px
  &.loading
    color rgba(#fff, 0)
  &.feedback
    z-index 1
    &:after
      transition background .2s, transform .2s
      border-radius 30px
      position absolute
      visibility hidden
      width 200px
      height 100%
      top 0
      left 0
      content ''
      background rgba(#fff, .9)
  &:hover
    background rgba(#fff, .1)

svg
  position relative
  z-index 2
  pointer-events none
  width 240px
  height 220px
  cursor pointer
  transform translate3d(0,0,0)

rect
  transition fill .5s easeInOutSine
  fill #3E3F4C

path
  fill none
  stroke-width 4px
  stroke-linecap round
  stroke #1ECD97
  stroke-dashoffset 0px
  &#top
  &#bottom
    transition stroke-dashoffset .5s easeOutBack, stroke-dasharray .5s easeOutBack, stroke .5s easeInOutSine
    stroke-dasharray 295px 1000px

.loading-start
  a
    color rgba(#fff, 0)
    &.loading
      color rgba(#fff, 1)
  a.feedback:after
    visibility visible
    background rgba(#fff, 0)
    transform scale(1.5, 2)
    transform-origin 
  #top
  #bottom
    transition stroke-dashoffset .5s easeOutBack, stroke-dasharray .5s easeOutBack
    stroke-dasharray 10px 1000px

.loading-progress
  #top
  #bottom
    transition stroke-dashoffset 1s linear, stroke-dasharray 1s linear
    stroke-dasharray 10px 1000px
    stroke-dashoffset -150px

.loading-end
  a.loading
    color rgba(#fff, 0)
  #top
  #bottom
    stroke #f5f6f7
  #top
    transition stroke-dashoffset .5s easeOutBack, stroke-dasharray .5s easeOutBack, stroke .5s easeInOutSine
    stroke-dasharray 30px 1000px
    stroke-dashoffset -518px
  #bottom
    transition stroke-dashoffset .5s easeOutBack, stroke-dasharray .5s easeOutBack, stroke .5s easeInOutSine
    stroke-dasharray 10px 1000px
    stroke-dashoffset -490px
  rect
    fill #1ECD97 !important

            
          
!
            
              $("div").click ->
  if $("div").hasClass "loading-start"
    if $("div").hasClass "loading-end"
      $("div").attr("class", "")
  else
    setTimeout (-> $("div").addClass("loading-start"))   ,    0
    setTimeout (-> $("div").addClass("loading-progress")),  500
    setTimeout (-> $("div").addClass("loading-end"))     , 1500

resize = ->
  $("body").css
    "margin-top": ~~((window.innerHeight - 260) / 2) + "px"
    
$(window).resize resize
resize()

            
          
!
999px
Close

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.

Go PRO

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

Console