Created
May 17, 2017 03:37
-
-
Save lizardking8610/ad8a623d933042a2e42867808368f5d0 to your computer and use it in GitHub Desktop.
Hover Effects wiht CSS
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: 0 0 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: 0 10px 10px -10px rgba(0, 0, 0, 0.5); | |
| transform: scale(1.1); | |
| } | |
| #jcfctaheadercontainer ul { | |
| float: right; | |
| list-style-type: none; | |
| margin: 20px 0 0; | |
| padding: 0; | |
| text-align: center; | |
| } | |
| #jcfctaheadercontainer ul li { | |
| display: inline; | |
| margin-right: 10px; | |
| text-decoration: none; | |
| } | |
| #jcfctaheadercontainer ul li a:hover { | |
| background-color: #96c2b3; | |
| text-decoration: none; | |
| } | |
| #jcfctaheadercontainer ul li a { | |
| background-color: #ea7e23; | |
| text-decoration: none; | |
| color: #ffffff; | |
| font-size: 16px; | |
| padding: 0.25em 2.5em; | |
| } | |
| @media (max-width: 500px) { | |
| #jcfctaheadercontainer ul { | |
| float: right; | |
| list-style-type: none; | |
| margin: 15px 0 0; | |
| padding: 0; | |
| text-align: center; | |
| } | |
| #jcfctaheadercontainer ul li { | |
| display: inline; | |
| text-decoration: none; | |
| } | |
| #jcfctaheadercontainer ul li a:hover { | |
| background-color: #96c2b3; | |
| } | |
| #jcfctaheadercontainer ul li a { | |
| background-color: #ea7e23; | |
| color: #ffffff; | |
| padding: 0.2em 0.75em; | |
| } | |
| } | |
| .hvr-shutter-in-vertical { | |
| background: #96c2b3 none repeat scroll 0 0; | |
| box-shadow: 0 0 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; | |
| bottom: 0; | |
| content: ""; | |
| left: 0; | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| transform: scaleY(1); | |
| transform-origin: 50% 50% 0; | |
| 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 { | |
| box-shadow: 0 0 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; | |
| bottom: 0; | |
| content: ""; | |
| left: 0; | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| transform: scaleX(0); | |
| transform-origin: 0 50% 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 { | |
| color: white; | |
| } | |
| .hvr-bounce-to-right:hover::before, | |
| .hvr-bounce-to-right:focus::before, | |
| .hvr-bounce-to-right:active::before { | |
| transform: scaleX(1); | |
| transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66); | |
| } | |
| .hvr-bounce-to-top { | |
| box-shadow: 0 0 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; | |
| bottom: 0; | |
| content: ""; | |
| left: 0; | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| transform: scaleY(0); | |
| transform-origin: 50% 100% 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 { | |
| color: white; | |
| } | |
| .hvr-bounce-to-top:hover::before, | |
| .hvr-bounce-to-top:focus::before, | |
| .hvr-bounce-to-top:active::before { | |
| 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: 0 0 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: 0; | |
| content: ""; | |
| left: 0; | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| transform: scale(1); | |
| transition-duration: 0.3s; | |
| transition-property: transform; | |
| transition-timing-function: ease-out; | |
| z-index: -1; | |
| } | |
| .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