LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
Live version of Erik Deiner's Twitter Button Concept on Dribbble.
CSS
section, section div {
  /* See it in slo-mo, you can change this */
  -webkit-transition-duration: .6s;
          transition-duration: .6s;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-image: -webkit-radial-gradient(center top, circle farthest-corner, #FFFFFF 0%, #D8DFE9 100%);
  background-image: -webkit-radial-gradient(circle farthest-corner at center top, #FFFFFF 0%, #D8DFE9 100%);
  background-image: radial-gradient(circle farthest-corner at center top, #FFFFFF 0%, #D8DFE9 100%);
  overflow: hidden;
}

section, .button { -webkit-transition-timing-function: ease; transition-timing-function: ease; }

section {
  display: inline-block;
  position: relative;
  padding: .375rem .375rem 0;
  height: 2.5rem;
  background: #A9ADB6;
  border-radius: .25rem;
  -webkit-perspective: 300;
          perspective: 300;
  box-shadow: 0 -1px 2px #fff, inset 0 1px 2px rgba(0,0,0,.2), inset 0 .25rem 1rem rgba(0,0,0,.1);
}


.button { opacity: 0; }

.cover {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  -webkit-transform-origin: center bottom;
          transform-origin: center bottom;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  font: 1.25em/2 "icon";
  color: white;
  text-align: center;
  pointer-events: none;
  z-index: 100;
}

.innie, .outie, .spine, .shadow { position: absolute; width: 100%; }

.innie, .outie {
  height: 100%;
  background-image: -webkit-linear-gradient(top, transparent 0%, rgba(0,0,0,.1) 100%);
  border-radius: .25rem;
}
.innie:after, .outie:after { content:"t"; }

.innie {
  background-color: #67E2FE;
  text-shadow: 0 -2px 4px rgba(0,0,0,.2);
}

.spine {
  top: .25rem;
  background: #20C7F3;
  height: .25rem;
  -webkit-transform: rotateX(90deg);
          transform: rotateX(90deg);
  -webkit-transform-origin: center top;
          transform-origin: center top;
}

.shadow {
  top: 100%;
  left: 0;
  height: 3.5rem;
  -webkit-transform-origin: center top;
          transform-origin: center top;
  -webkit-transform: rotateX(90deg);
          transform: rotateX(90deg);
  opacity: 0;
  z-index: 0;
  background-image: -webkit-linear-gradient(top, rgba(0,0,0,.6) 0%, transparent 100%);
  background-image: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, transparent 100%);
  border-radius: .4rem;

}

.outie {
  background-color: #2EC8FA;
  -webkit-transform: translateZ(.25rem);
          transform: translateZ(.25rem);
  text-shadow: 0 2px 4px rgba(0,0,0,.2);
}

section:hover { background: #EBEFF2; }
section:hover .button { opacity: 1; }

section:hover .cover, section:hover .innie, section:hover .spine, section:hover .outie, section:hover .spine { -webkit-transition-timing-function: cubic-bezier(.2,.7,.1,1.1); transition-timing-function: cubic-bezier(.2,.7,.1,1.1); }

section:hover .cover { -webkit-transform: rotateX(-120deg); transform: rotateX(-120deg);  }

section:hover .innie { background-color: #3ADAFC; }
section:hover .spine { background-color: #52B1E0; }
section:hover .outie { background-color: #2174A0; color: rgba(255,255,255,0); }

section:hover .shadow { 
  opacity: 1;
  -webkit-transform: rotateX(45deg) scale(.95);
          transform: rotateX(45deg) scale(.95);
}


small {
  font: .8rem/1 sans-serif;
  padding-top: 4rem;
  color: #777;
}
small a { color: #222; text-decoration: none; border-bottom: thin solid #ccc; }
small a:hover { border-bottom-color: #222; }


/* Twitter font icon: https://codepen.io/bennettfeely/pen/GCAKJ */
@font-face { font-family:icon; src: url('https://bennettfeely.com/fonts/icons.woff'); }

Description

Recreation of the popular shot: http://dribbble.com/shots/457259-Twitter-Button-Concept
Term
Mon, 11/27/2017 - 21:20

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv