A Pen by Anonasaurus Rex on CodePen.
Created
September 25, 2014 16:20
-
-
Save anonymous/84caede5d7d52a337996 to your computer and use it in GitHub Desktop.
A Pen by A Non Ymous.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button class="success" onclick="this.setAttribute('disabled', 'disabled');this.className='success loading';">SUBMIT</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| button { | |
| position: relative; | |
| height: 50px; | |
| line-height: 50px; | |
| padding: 0px 30px; | |
| border: none; | |
| outline: none; | |
| border-radius: 2px; | |
| font-size: 14px; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| } | |
| button.success { | |
| background-color: #74a26e; | |
| color: white; | |
| } | |
| button.success:hover { | |
| background-color: #51774c; | |
| } | |
| button:disabled:hover, | |
| button:disabled { | |
| cursor: default; | |
| background-color: #EEEEEE; | |
| color: #DDDDDD; | |
| text-shadow: 1px 1px 1px #FFFFFF; | |
| box-shadow: none; | |
| } | |
| button.loading { | |
| padding-right: 60px; | |
| } | |
| button.loading:before, button.loading:after { | |
| content: ''; | |
| position: absolute; | |
| top: 50%; | |
| right: 0; | |
| bottom: 0; | |
| width: 20px; | |
| height: 20px; | |
| margin-top: -10px; | |
| margin-right: 30px; | |
| border: 2px solid #DDDDDD; | |
| border-radius: 50%; | |
| box-sizing: border-box; | |
| } | |
| button.loading:after { | |
| border-left-color: rgba(255, 255, 255, 0.8); | |
| -webkit-animation: rotate 0.8s linear infinite; | |
| -moz-animation: rotate 0.8s linear infinite; | |
| animation: rotate 0.8s linear infinite; | |
| } | |
| @-webkit-keyframes rotate { | |
| 0% { | |
| -webkit-transform: rotate(0); | |
| } | |
| 100% { | |
| -webkit-transform: rotate(360deg); | |
| } | |
| } | |
| @-moz-keyframes rotate { | |
| 0% { | |
| -moz-transform: rotate(0); | |
| } | |
| 100% { | |
| -moz-transform: rotate(360deg); | |
| } | |
| } | |
| @keyframes rotate { | |
| 0% { | |
| transform: rotate(0); | |
| } | |
| 100% { | |
| transform: rotate(360deg); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment