This code creates a smooth hover effect that rises a div slightly above its usually placement as though it glides instead of a sudden movement of step transition.
Last active
May 14, 2021 17:44
-
-
Save DayleySenior/e6d19f8182b7aebe9776d42c5345c492 to your computer and use it in GitHub Desktop.
CSS Smooth Hover Animation Rise Effect
This file contains 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
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" /> | |
<div id="arrow"> | |
<a href="#"><i class="fa fa-arrow-down fa-2x"></i></a> | |
</div> |
This file contains 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
#arrow { | |
position: relative; | |
top: 0; | |
transition: top ease 0.5s; | |
} | |
#arrow:hover { | |
top: -8px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment