mirror of
https://github.com/l-lin/font-awesome-animation.git
synced 2024-12-26 21:41:31 +08:00
Simple animations using FontAwesome and some CSS3.
.github/workflows | ||
css | ||
scripts | ||
scss | ||
_config.yml | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md |
font-awesome-animation
Simple animations using some CSS3 I found on the web. Best used on glyphicons like FontAwesome
Getting started
Install from NPM:
npm install font-awesome-animation
Or with a CDN:
https://www.jsdelivr.com/package/npm/font-awesome-animation
Include CSS file in your index.html file:
<link rel="stylesheet" href="font-awesome-animation.min.css">
Usage
On DOM load
Add the desired CSS class faa-xxx
along with animated
to the icon (or any element of your DOM):
<i class="fa fa-wrench faa-wrench animated"></i>
On hover
Instead of using animated
, use the animated-hover
CSS class:
<i class="fa fa-wrench faa-wrench animated-hover"></i>
On parent element hover
For parent hover, add the CSS class faa-parent
and animated-hover
on the parent element:
<a href="#" class="faa-parent animated-hover">
<i class="fa fa-wrench faa-wrench"></i>
</a>
You can regulate the speed of the animation by adding the CSS class faa-fast
or faa-slow
:
<i class="fa fa-wrench faa-wrench animated faa-fast"></i>
<i class="fa fa-wrench faa-wrench animated faa-slow"></i>
Development
# install dependencies
npm install
# generate prefixes and minified CSS files
npm run build