Skip to content

Instantly share code, notes, and snippets.

@DayleySenior
Last active May 14, 2021 17:44
Show Gist options
  • Save DayleySenior/e6d19f8182b7aebe9776d42c5345c492 to your computer and use it in GitHub Desktop.
Save DayleySenior/e6d19f8182b7aebe9776d42c5345c492 to your computer and use it in GitHub Desktop.
CSS Smooth Hover Animation Rise Effect

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.

<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>
#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