Instantly share code, notes, and snippets.
Created
May 18, 2017 16:45
-
Star
1
(1)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save lizardking8610/157c9a5db9c10c68aaf5e8d4b6337c0e to your computer and use it in GitHub Desktop.
Rounded Buttons with CSS effects
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
| .hvr-grow-shadow { | |
| box-shadow: 0px 0px 1px transparent; | |
| display: inline-block; | |
| transform: perspective(1px) translateZ(0px); | |
| transition-duration: 0.3s; | |
| transition-property: box-shadow, transform; | |
| vertical-align: middle; | |
| } | |
| .hvr-grow-shadow:hover, | |
| .hvr-grow-shadow:focus, | |
| .hvr-grow-shadow:active { | |
| box-shadow: 0px 10px 10px -10px rgba(0, 0, 0, 0.5); | |
| transform: scale(1.1); | |
| } | |
| #jcfctaheadercontainer ul { | |
| float: right; | |
| list-style-type: none; | |
| margin: 20px 0px 0px; | |
| padding: 0px; | |
| text-align: center; | |
| } | |
| #jcfctaheadercontainer ul li { | |
| display: inline; | |
| margin-right: 10px; | |
| text-decoration: none; | |
| } | |
| #jcfctaheadercontainer ul li a:hover { | |
| background-color: #96c2b3; | |
| } | |
| #jcfctaheadercontainer ul li a { | |
| background-color: #ea7e23; | |
| border-radius: 25px; | |
| color: #ffffff; | |
| font-size: 16px; | |
| padding: 0.25em 2.5em; | |
| text-decoration: none; | |
| } | |
| @media (max-width: 500px) { | |
| #jcfctaheadercontainer ul { | |
| float: right; | |
| list-style-type: none; | |
| padding: 0px; | |
| text-align: center; | |
| margin: 15px 0px 0px; | |
| } | |
| #jcfctaheadercontainer ul li { | |
| display: inline; | |
| text-decoration: none; | |
| } | |
| #jcfctaheadercontainer ul li a:hover { | |
| background-color: #96c2b3; | |
| } | |
| #jcfctaheadercontainer ul li a { | |
| background-color: #ea7e23; | |
| border-radius: 25px; | |
| color: #ffffff; | |
| padding: 0.2em 0.75em; | |
| } | |
| } | |
| .hvr-shutter-in-vertical { | |
| background: #96c2b3 none repeat scroll 0% 0%; | |
| border-radius: 25px; | |
| box-shadow: 0px 0px 1px transparent; | |
| display: inline-block; | |
| position: relative; | |
| transform: perspective(1px) translateZ(0px); | |
| transition-duration: 0.3s; | |
| transition-property: color; | |
| vertical-align: middle; | |
| } | |
| .hvr-shutter-in-vertical::before { | |
| background: #ea7e23 none repeat scroll 0% 0%; | |
| border-radius: 25px; | |
| bottom: 0px; | |
| content: ""; | |
| left: 0px; | |
| position: absolute; | |
| right: 0px; | |
| top: 0px; | |
| transform-origin: 50% 50% 0px; | |
| transform: scaleY(1); | |
| transition-duration: 0.6s; | |
| transition-property: transform; | |
| transition-timing-function: ease-out; | |
| z-index: -1; | |
| } | |
| .hvr-shutter-in-vertical:hover, | |
| .hvr-shutter-in-vertical:focus, | |
| .hvr-shutter-in-vertical:active { | |
| color: white; | |
| } | |
| .hvr-shutter-in-vertical:hover::before, | |
| .hvr-shutter-in-vertical:focus::before, | |
| .hvr-shutter-in-vertical:active::before { | |
| transform: scaleY(0); | |
| } | |
| .hvr-bounce-to-right { | |
| border-radius: 25px; | |
| box-shadow: 0px 0px 1px transparent; | |
| display: inline-block; | |
| position: relative; | |
| transform: perspective(1px) translateZ(0px); | |
| transition-duration: 0.5s; | |
| transition-property: color; | |
| vertical-align: middle; | |
| } | |
| .hvr-bounce-to-right::before { | |
| background: #96c2b3 none repeat scroll 0% 0%; | |
| border-radius: 25px; | |
| bottom: 0px; | |
| content: ""; | |
| left: 0px; | |
| position: absolute; | |
| right: 0px; | |
| top: 0px; | |
| transform-origin: 0px 50% 0px; | |
| transform: scaleX(0); | |
| transition-duration: 0.5s; | |
| transition-property: transform; | |
| transition-timing-function: ease-out; | |
| z-index: -1; | |
| } | |
| .hvr-bounce-to-right:hover, | |
| .hvr-bounce-to-right:focus, | |
| .hvr-bounce-to-right:active { | |
| border-radius: 25px; | |
| color: white; | |
| } | |
| .hvr-bounce-to-right:hover::before, | |
| .hvr-bounce-to-right:focus::before, | |
| .hvr-bounce-to-right:active::before { | |
| border-radius: 25px; | |
| transform: scaleX(1); | |
| transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66); | |
| } | |
| .hvr-bounce-to-top { | |
| border-radius: 25px; | |
| box-shadow: 0px 0px 1px transparent; | |
| display: inline-block; | |
| position: relative; | |
| transform: perspective(1px) translateZ(0px); | |
| transition-duration: 0.5s; | |
| transition-property: color; | |
| vertical-align: middle; | |
| } | |
| .hvr-bounce-to-top::before { | |
| background: #96c2b3 none repeat scroll 0% 0%; | |
| border-radius: 25px; | |
| bottom: 0px; | |
| content: ""; | |
| left: 0px; | |
| position: absolute; | |
| right: 0px; | |
| top: 0px; | |
| transform-origin: 50% 100% 0px; | |
| transform: scaleY(0); | |
| transition-duration: 0.5s; | |
| transition-property: transform; | |
| transition-timing-function: ease-out; | |
| z-index: -1; | |
| } | |
| .hvr-bounce-to-top:hover, | |
| .hvr-bounce-to-top:focus, | |
| .hvr-bounce-to-top:active { | |
| border-radius: 25px; | |
| color: white; | |
| } | |
| .hvr-bounce-to-top:hover::before, | |
| .hvr-bounce-to-top:focus::before, | |
| .hvr-bounce-to-top:active::before { | |
| border-radius: 25px; | |
| transform: scaleY(1); | |
| transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66); | |
| } | |
| .hvr-rectangle-in { | |
| background: #96c2b3 none repeat scroll 0% 0%; | |
| box-shadow: 0px 0px 1px transparent; | |
| display: inline-block; | |
| position: relative; | |
| transform: perspective(1px) translateZ(0px); | |
| transition-duration: 0.3s; | |
| transition-property: color; | |
| vertical-align: middle; | |
| } | |
| .hvr-rectangle-in::before { | |
| background: #ea7e23 none repeat scroll 0% 0%; | |
| bottom: 0px; | |
| content: ""; | |
| left: 0px; | |
| position: absolute; | |
| right: 0px; | |
| top: 0px; | |
| transform: scale(1); | |
| transition-duration: 0.3s; | |
| transition-property: transform; | |
| transition-timing-function: ease-out; | |
| z-index: -1; | |
| border-radius: 25px | |
| } | |
| .hvr-rectangle-in:hover, | |
| .hvr-rectangle-in:focus, | |
| .hvr-rectangle-in:active { | |
| color: white; | |
| } | |
| .hvr-rectangle-in:hover::before, | |
| .hvr-rectangle-in:focus::before, | |
| .hvr-rectangle-in:active::before { | |
| transform: scale(0); | |
| } |
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
| <div id="jcfctaheadercontainer"> | |
| <ul> | |
| <li><a href="#" class="hvr-shutter-in-vertical">Press</a></li> | |
| <li><a href="#" class="hvr-rectangle-in">Share</a></li> | |
| <li><a href="#" class="hvr-grow-shadow">Donate</a></li> | |
| </ul> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment