octocatstartv

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.

Want a Run Button?

If active, the preview will update automatically when you change code.

            
              <button>
  <div></div>
  <div></div>
  <div></div>
</button>
<p>hover & hold me down</p>


<a target="_blank" href="https://dribbble.com/Alexcoven"><img src="http://i.imgur.com/kF8rP6D.png"></a>
            
          
!
            
              body {
  background: #F26451;
}

img {
  width:30px;
  position:absolute;
  bottom:20px;
  right:20px;
}

p {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 10px;
  font-family: "helvetica" sans;
  text-align: center;
  margin-top: 45px;
  margin-left: -85px;
}

button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transition: all 300ms cubic-bezier(.61, .01, .42, 1);
  cursor: pointer;
  background: transparent;
  border: 0px;
}

div {
  height: 0px;
  border: 1.5px solid #fff;
  width: 22px;
  display: block;
  position: absolute;
  transition: all 300ms cubic-bezier(.61, .01, .42, 1);
  background:#fff;
}

button:hover {
  transition-delay: 100ms;
  transform: scale(1.1);
}

button:hover div:nth-child(3):before {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #F26451;
}

button:hover div {
  border: 2px solid #fff;
  height: 9px;
  border-radius: 50%;
  margin-left: -1px;
  margin-top: 2px;
  animation: atom 300ms linear 1;
  width: 25px;
  top: 0px;
  background:transparent;
}

button:focus {
  outline: 0px;
}

div:nth-child(1) {
  top: 0px;
}

div:nth-child(2) {
  top: 8px;
}

div:nth-child(3) {
  top: 16px;
}

div:nth-child(3):before {
  opacity: 0;
  animation: ball 1.5s linear infinite;
  content: '';
  border: 2px solid #fff;
  display: block;
  position: relative;
  top: 0.25px;
}

button:hover div:nth-child(1) {
  transform: rotate(-33deg);
}

button:hover div:nth-child(2) {
  transform: rotate(90deg);
}

button:hover div:nth-child(3) {
  transform: rotate(33deg);
}

button:hover div:nth-child(3):before {
  opacity: 1;
  transition: opacity 600ms cubic-bezier(.61, .01, .42, 1);
  ;
}

button:active:hover div:nth-child(3):before,
button:active div:nth-child(3):before,
button:active div:nth-child(2) {
  opacity: 0;
  transition: all 200ms;
}

button:active div {
  border: 1.5px solid #fff;
  height: 0px;
  border-radius: 0%;
  margin-left: -1px;
  margin-top: 6px;
  animation: division 300ms linear 1;
  width: 25px;
  top: 0px;
}

button:active div:nth-child(2) {
  width: 0px;
}

button:active div:nth-child(3) {
  transform: rotate(45deg);
}

button:active div:nth-child(1) {
  transform: rotate(-45deg);
}

@keyframes atom {
  0% {
    transform: rotate(180deg);
  }
}

@keyframes division {
  0% {
    transform: rotate(180deg);
  }
}

@keyframes ball {
  0% {
    left: -20%;
    top: 10%;
  }
  10% {
    left: 10%;
    top: -35%;
  }
  25% {
    left: 45%;
    top: -50%;
  }
  40% {
    left: 80%;
    top: -20%;
  }
  50% {
    left: 98%;
    top: 18%;
  }
  60% {
    left: 80%;
    top: 50%;
  }
  75% {
    left: 45%;
    top: 80%;
  }
  90% {
    left: 0%;
    top: 60%;
  }
  100% {
    left: -20%;
    top: 10%;
  }
}
            
          
!
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