html - Text is not rotating with button -


i need rotating text @ same time button rotates. reason text disappearing when hover mouse on button. text should not disappearing; should rotating button i'm using chrome project.

http://codepen.io/matosmtz/pen/oxbaqe

html

<body>   <div class = "container">     <section class="3d-button">       <h2>animated button</h2>       <p class="btn_perspective">         <button class="btn btn-3d btn-3da">submit</button>       </p>     </section>   </div> </body> 

css

html, body {     font-size: 100%;     padding: 0;     margin: 0;     height: 100%;     border: 0; }  body {     font-family: lekton;     background: rgb(245,245,245); }  {     color: #888;     text-decoration: none; }  .container {     padding: 0;     margin: 0;     height: 100%;     background: #fff;     position: relative; }  .container > section {     margin: 0 auto;     padding: 6em 3em;     text-align: center; }  h2 {     margin: 20px;     text-align: center;     text-transform:uppercase;     letter-spacing: 1px;     font-size: 2em; }  .btn {     border:none;     position: relative;     background: rgb(245,245,245);     padding: 15px 40px;     display: inline-block;     text-transform: uppercase;     margin: 15px 30px;     color: inherit;     letter-spacing: 2px;     font-size: .9em;     outline: none;     -webkit-transition: 0.4s;     transition: 0.4s;     cursor: pointer; }  .btn:after {     content: "";     position: absolute;     z-index: -1;     -webkit-transition: 0.4s;     transition: 0.4s; }  .btn_perspective {     -webkit-perspective: 800px;     perspective: 800px;     display: inline-block; }  .btn-3d {     display: block;     background: #5cbcf6;     color: white;     outline: 1px solid transparent;     transform-style: preserve-3d; }  .btn-3d:active {     background: #55b7f3; }  .btn-3da:after {     width: 100%;     height: 42%;     left: 0;     top: -40%;     background: #53a6d7;     transform-origin: 0% 100%;     transform: rotatex(90deg); }  .btn-3da:hover {     transform: rotatex(-45deg); } 

here's updated codepen: http://codepen.io/anon/pen/kpagyd

added following code button:

.btn-3da:after {  z-index:1; }  .btn-3da:hover {   position:relative;   z-index:2; } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -