Edit in JSFiddle

<section style="background:yellow; text-align:center; padding-top:4px;">
     <h4>Buttons Flexing their Muscles in CSS3, hover over button to see flexing<br>
       Tip of the Hat to  <a  href="http://tympanus.net/codrops/?p=15430">Mary Lou at Codrops </a></h4>

    <section>
        <section class="color-8">
            <p class="perspective">
                <button class="btn btn-8 btn-8a">3D Button A</button>
            </p>
            <p class="perspective">
                <button class="btn btn-8 btn-8b">3D Button B</button>
            </p>
            <br />
            <p class="perspective">
                <button class="btn btn-8 btn-8c">3D Button C</button>
            </p>
            <p class="perspective">
                <button class="btn btn-8 btn-8d">3D Button D</button>
            </p>

            <span class="perspective">
                <button class="btn btn-8 btn-8e">3D Button E</button>
            </span>
            <div class="perspective">
                <button class="btn btn-8 btn-8f">3D Button F</button>
            </div>
           
        </section>
.color-8 {
    background:#4967df;
}
.perspective {
    -webkit-perspective: 800px;
    -moz-perspective: 800px;
    perspective: 800px;
    display: inline-block;
}
.btn {
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: white;
    background: none;
    cursor: pointer;
    padding: 25px 80px;
    display: inline-block;
    margin: 15px 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    outline: none;
    position: relative;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
}
.btn-8 {
    display: block;
    background: #22bcc6;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    transform-style: preserve-3d;
}
.btn-8:active {
    background: #55b7f3;
}
/* Button 8a */
 .btn-8a:after {
    width: 100%;
    height: 40%;
    left: 0;
    top: -40%;
    background: #49a7df;
    -webkit-transform-origin: 0% 100%;
    -webkit-transform: rotateX(90deg);
    -moz-transform-origin: 0% 100%;
    -moz-transform: rotateX(90deg);
    transform-origin: 0% 100%;
    transform: rotateX(90deg);
}
.btn-8a:hover {
    -webkit-transform: rotateX(-25deg);
    -moz-transform: rotateX(-25deg);
    -ms-transform: rotateX(-25deg);
    transform: rotateX(-25deg);
}
/* Button 8b */
 .btn-8b:after {
    width: 100%;
    height: 40%;
    left: 0;
    top: 100%;
    background: #49a7df;
    -webkit-transform-origin: 0% 0%;
    -webkit-transform: rotateX(-90deg);
    -moz-transform-origin: 0% 0%;
    -moz-transform: rotateX(-90deg);
    -ms-transform-origin: 0% 0%;
    -ms-transform: rotateX(-90deg);
    transform-origin: 0% 0%;
    transform: rotateX(-90deg);
}
.btn-8b:hover {
    -webkit-transform: rotateX(35deg);
    -moz-transform: rotateX(35deg);
    -ms-transform: rotateX(35deg);
    transform: rotateX(35deg);
}
.btn-8c:after {
    width: 20%;
    height: 100%;
    left: -20%;
    top: 0;
    background: #49a7df;
    -webkit-transform-origin: 100% 0%;
    -webkit-transform: rotateY(-90deg);
    -moz-transform-origin: 100% 0%;
    -moz-transform: rotateY(-90deg);
    -ms-transform-origin: 100% 0%;
    -ms-transform: rotateY(-90deg);
    transform-origin: 100% 0%;
    transform: rotateY(-90deg);
}
.btn-8c:hover {
    -webkit-transform: rotateY(25deg);
    -moz-transform: rotateY(25deg);
    -ms-transform: rotateY(25deg);
    transform: rotateY(25deg);
}
/* Button 8d */
 .btn-8d:after {
    width: 20%;
    height: 100%;
    left: 100%;
    top: 0;
    background: #49a7df;
    -webkit-transform-origin: 0% 0%;
    -webkit-transform: rotateY(90deg);
    -moz-transform-origin: 0% 0%;
    -moz-transform: rotateY(90deg);
    -ms-transform-origin: 0% 0%;
    -ms-transform: rotateY(90deg);
    transform-origin: 0% 0%;
    transform: rotateY(90deg);
}
.btn-8d:hover {
    -webkit-transform: rotateY(-15deg);
    -moz-transform: rotateY(-15deg);
    -ms-transform: rotateY(-15deg);
    transform: rotateY(-15deg);
}
/* Button 8e */
 .btn-8e {
    -webkit-transform: rotateX(-40deg);
    -moz-transform: rotateX(-40deg);
    -ms-transform: rotateX(-40deg);
    transform: rotateX(-40deg);
}
.btn-8e:after {
    width: 100%;
    height: 40%;
    left: 0;
    top: -40%;
    background: #49a7df;
    -webkit-transform-origin: 0% 100%;
    -webkit-transform: rotateX(90deg);
    -moz-transform-origin: 0% 100%;
    -moz-transform: rotateX(90deg);
    -ms-transform-origin: 0% 100%;
    -ms-transform: rotateX(90deg);
    transform-origin: 0% 100%;
    transform: rotateX(90deg);
}
.btn-8e:active {
    -webkit-transform: rotateX(0deg);
    -moz-transform: rotateX(0deg);
    -ms-transform: rotateX(0deg);
    transform: rotateX(0deg);
}
/* Button 8f */
 .btn-8f {
    -webkit-transform: rotateX(45deg);
    -moz-transform: rotateX(45deg);
    -ms-transform: rotateX(45deg);
    transform: rotateX(45deg);
}
.btn-8f:after {
    width: 100%;
    height: 40%;
    left: 0;
    top: 100%;
    background: #49a7df;
    -webkit-transform-origin: 0% 0%;
    -webkit-transform: rotateX(-90deg);
    -moz-transform-origin: 0% 0%;
    -moz-transform: rotateX(-90deg);
    -ms-transform-origin: 0% 0%;
    -ms-transform: rotateX(-90deg);
    transform-origin: 0% 0%;
    transform: rotateX(-90deg);
}
.btn-8f:active {
    -webkit-transform: rotateX(0deg);
    -moz-transform: rotateX(0deg);
    -ms-transform: rotateX(0deg);
    transform: rotateX(0deg);
}