Skip to content

Instantly share code, notes, and snippets.

@nirmalkar
Created July 5, 2020 07:54
Show Gist options
  • Save nirmalkar/09f68c50e4e5b3f0a33201b800cac9a4 to your computer and use it in GitHub Desktop.
Save nirmalkar/09f68c50e4e5b3f0a33201b800cac9a4 to your computer and use it in GitHub Desktop.
//html
<span class="change-icon icon-top">
<i class="far fa-heart"></i>
<i class="fas fa-heart"></i>
</span>
/*css*/
.change-icon > .far + .fas,
.change-icon:hover > .far {
display: none;
}
.change-icon:hover > .far + .fas {
display: inherit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment