mirror of
https://github.com/animate-css/animate.css.git
synced 2024-11-14 00:01:09 +01:00
v4 release (#1050)
* New animations added
* Update
* Update
* Update
* Update
* kill bower
* Turn off animations for print media query (#856)
* Add a feature to turn off animations for printing as requested.
* Add print media type
* Update the builds
* Moved away from gulp to npx + postcss
This PR changes the build system for a simpler one, using only npx as runner and postcss to process all the files.
* Solves #618
* Solves #836
* Also solves #758 just for fun ;P
* Updated travis and removed animate-config.json
* Removed strayed gulpfile and trimmed the header
* Moved prefix config to package.json and updated the tasks
* Updated travis
* Updated dependencies and postcss config
* Now using CSS custom properties
* Add css module file - solves #933
* Updated README for the new build
* Rebulit files
* Updated dependencies + added browserlist
* Fixed small typo on README
* Added imports to Back animations
* Added FadeInTopLeft.css file
Fade in the animation diagonally
* Added fadeInTopRight.css file
Fade in the animation diagonally
* Added fadeInBottomLeft.css
* Added fadeInBottomRight.css
* Added fadeOutTopLeft.css
* Added fadeOutTopRight.css
* Added fadeOutBottomRight.css
* Added fadeOutBottomLeft.css
* Added imports to diagonal fadings
* Aditional formatting
* Added diagonal fadings to README
* Fixes #966
* Animate.css v4 Updates (#1029)
* Update to v4
* Add Iteration-Count CSS utility classes solves #998
* Updated builds
* Update lightSpeed animations
* Update builds
* Fix Invalid CSS Media Query Syntax
* Update build
* Add gitpod support
* Add newline in gitpod file
* Update README
* Revert
* Declare variable
* Update builds
* Remove Gitpod support
Co-authored-by: Waren Gonzaga <warengonzaga.dev@gmail.com>
* Improves building process and package.json tidy up
* Improved animations (#901)
* Improved bounce
* Improved pulse
* Improved bounceInDown
* Improved bounceInLeft
* Improved bounceInRight
* Improved bounceInUp
* Improved bounceOutDown
* Improved bounceOuLeft
* Improved bounceOuRight
* Improved bounceOutRight
* Improved fadeInDown
* Improved fadeInDownBig
* Improved fadeInLeft
* Improved fadeInLeftBig
* Improved fadeInRightBig
* Improved fadeInUp
* Improved fadeInUpBig
* Improved fadeInRight
* Reverted fade animations
* Compiled
* Updated prefers-reduced-motion support on README
* Add .delay-1s (#982)
The .delay-1s is missing from the readme
* HTTPS relevant links on README (#972)
prevents HTTP redirects
* Create CONTRIBUTING.md (#1033)
Co-authored-by: Melek REBAI <melek.rebai89@gmail.com>
Co-authored-by: Christian Oliff <christianoliff@yahoo.com>
Co-authored-by: Daniel Eden <dan.eden@me.com>
* Updates dependencies
* Updates prettier config
* refactory transform-origin in styles
* animation shake with X and Y options 🔨
* Adds shakeX and shakeY to the build
* Set 0 Opacity to Out animation classes (#1043)
* Update issue templates
* Add 0 opacity to out classes
* Update builds
* Improved implemenation
* Update builds
* Update current readme
* Update builds
Co-authored-by: Elton Mesquita <callmeelton@gmail.com>
Co-authored-by: Waren Gonzaga <warengonzaga.dev@gmail.com>
* Removes prefix from att selector
* Feature/new demo site (#1046)
* Simplify & centralize the Animate.css home page. Finally.
* Design tweak
* Fix Lightspeed demos
* Fix Lightspeed demos (cont.)
* Trigger animation on change as well as click
* Correct jQuery example. Fixes #127
* Remove Readme on gh-pages to prevent mistakes like ee75b81
* Use animate.min.css because whatever
* Update demo page with MS animation JS hooks.
* Updating home page with rubberBand animation.
* Reverse hue animation
Red-orange-brown isn’t a great first impression.
* Add readme, use cssmin minified CSS instead of csso
* Update gh-pages
* Remove protocol from urls
Fixes Chrome’s SSL issue
* Remove Square Cash link
Donations are weird, and only US account holders could use this.
* Updating Gh-page animate.css to the current version
This is a simple commit, bringing animate.css up to date with the current master version.
* Updating Gh-page animate.min.css to reflect the current version
This is a simply update to the Animate.min.css file, to reflect the current version
* Update CSS
* Updating Gh-page index.html to the reflect the addition of zooms (in out down etc)
This adds the optgroup "zoom", and associated options of: ZoomIn, zoomOut, zoomInDown, zoomInUp, zoomInLeft, zoomInRight, zoomOutLeft, zoomOutRight, zoomOutUp, and zoomOutDown.
* refactoring index.html to mimic the current optgroup styling
I added zooms, which were absent, but added them in a way that didn't reflect the current optgroup styling and delineation. I fixed that and now exits and entrances are grouped appropriately.
* updated index.html to reflect the standard optgroup styling on sliders, added slideInDown
In addition to adding slider keyframes that were missing, I placed them into the appropriate optgroups to mimic the similar styling of the other animations.
* Merging updated version of animate.min.css
As requested, this is the updated version of animate.min.css that @daneden request I include in the pull request.
* Updated animate.min.css
Made it the new version
* added jello to options
* Update CSS
* Add jackInTheBox to gh-pages (#694)
* New Special - jackInTheBox
* copy min.css from master branch
* fixed the issue of overflow scroll (#740)
for more see this issue https://github.com/daneden/animate.css/issues/739
* Adds heartBeat animation demo (#893)
* Update animate.min.css to latest version
* Updated CSS for current browsers
* Updated animate.css
* Removed useless test folder
* Added warn about prefers-reduced-motion
* Adds docs compiler
* Adds new base template
* Improves the docs compiler
* Fixes flipOutY animation
* Updates docs template and build
* Reorder docs sections
* Updates docs animation list template
* Updates prettier ignore
* Adds syntax highlight to docs
* Small fixes to docs content
* Updates templates HTML
* Styles the demo website
* Adds functionality to demo website
* Fixes small website demo issue with medium screens
* Adds copy animation to demo site
* Renames loop classes to repeat
* Small adjusts to docs styles
* Updates docs template
* Updates docs improving copy and adding sections
* Reviews the docs copy
* Fix some issues with demo-site
* Fixes issue with the demo-site playground
* Adjusts tooltip on demo-site
* Fix layout issues on mobile and update “close” button for animations list
Co-authored-by: Daniel Eden <dan.eden@me.com>
Co-authored-by: Matt Willis <contact@mrwillis.net>
Co-authored-by: Gabrielmtn <Gabrielmtn@gmail.com>
Co-authored-by: Indy Prieto <proforced@gmail.com>
Co-authored-by: Robert Pemberton <hellorobertp@gmail.com>
Co-authored-by: Khaled nuur <kahalidnuur@gmail.com>
Co-authored-by: Vladimir Jovanović <vladimir.jovanovic993@gmail.com>
* Updates docs folders
* Fix some small documentation issues
* Updates edit on github link
Co-authored-by: Arda Gedik <arnoldsivastanegezer@hotmail.com>
Co-authored-by: Arda Gedik <ardagedikk@hotmail.com>
Co-authored-by: Jabran Rafique <jabran.rafique@ratedpeople.com>
Co-authored-by: Waren Gonzaga <waren.gonzaga.dev@gmail.com>
Co-authored-by: Jabran Rafique⚡️ <jabranr@users.noreply.github.com>
Co-authored-by: Vaibhav Tandon <vaibhav.tandongcet@gmail.com>
Co-authored-by: Waren Gonzaga <warengonzaga.dev@gmail.com>
Co-authored-by: Melek REBAI <melek.rebai89@gmail.com>
Co-authored-by: Christian Oliff <christianoliff@yahoo.com>
Co-authored-by: Daniel Eden <dan.eden@me.com>
Co-authored-by: Lucas Ferreira Lima <lucasferreiralimax@gmail.com>
Co-authored-by: Matt Willis <contact@mrwillis.net>
Co-authored-by: Gabrielmtn <Gabrielmtn@gmail.com>
Co-authored-by: Indy Prieto <proforced@gmail.com>
Co-authored-by: Robert Pemberton <hellorobertp@gmail.com>
Co-authored-by: Khaled nuur <kahalidnuur@gmail.com>
Co-authored-by: Vladimir Jovanović <vladimir.jovanovic993@gmail.com>
This commit is contained in:
parent
803ac71c50
commit
5a1c6b185b
93 changed files with 4605 additions and 1257 deletions
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -4,35 +4,32 @@ about: Create a report to help us improve
|
|||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
**Describe the bug** A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce** Steps to reproduce the behavior:
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
**Expected behavior** A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
**Screenshots** If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context** Add any other context about the problem here.
|
||||
|
|
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -4,17 +4,12 @@ about: Suggest an idea for this project
|
|||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
**Describe the solution you'd like** A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
**Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
**Additional context** Add any other context or screenshots about the feature request here.
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
animate.css
|
||||
animate.min.css
|
||||
animate.compat.css
|
||||
docs/dist/animate.min.css
|
||||
|
|
6
.prettierrc
Normal file
6
.prettierrc
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"bracketSpacing": false,
|
||||
"proseWrap": "never",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
|
@ -2,5 +2,5 @@ language: node_js
|
|||
node_js:
|
||||
- "10"
|
||||
before_script:
|
||||
- npm install -g gulp
|
||||
script: gulp
|
||||
- npm install
|
||||
script: npm run start
|
||||
|
|
|
@ -2,75 +2,46 @@
|
|||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at callmeelton@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at callmeelton@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# Contributing to Animate.css
|
||||
|
||||
Thanks for your interest in contributing to Animate.css! Before contributing, please make sure you understand the guidelines provided here. Animate.css is widely used, so it’s important to maintain a high level of quality and to contribute with the interests of the community in mind.
|
||||
|
||||
## Design Guidelines
|
||||
|
||||
Animations, like many facets of visual and interaction design, can be highly subjective. Maintaining a consistent library of animations in an active community can be difficult; these design guidelines are designed to help encourage thoughtful criticism of new animations that are proposed for Animate.css.
|
||||
|
||||
The animations in Animate.css should follow a few key principles:
|
||||
|
|
207
README.md
207
README.md
|
@ -1,210 +1,41 @@
|
|||
# Animate.css [![GitHub release](https://img.shields.io/github/release/daneden/animate.css.svg)](https://github.com/daneden/animate.css/releases) [![CDNJS](https://img.shields.io/cdnjs/v/animate.css.svg)](https://cdnjs.com/libraries/animate.css) [![Build Status](https://travis-ci.com/daneden/animate.css.svg?branch=master)](https://travis-ci.com/daneden/animate.css) [![devDependencies Status](https://david-dm.org/daneden/animate.css/dev-status.svg)](https://david-dm.org/daneden/animate.css?type=dev) [![npm version](https://badge.fury.io/js/animate.css.svg)](https://www.npmjs.com/package/animate.css)
|
||||
# Animate.css
|
||||
|
||||
> **We need your help!** animate.css v4 is in the work with lots of improvements and some breaking changes, including CSS custom properties support (aka CSS variables) and classes prefix for a safer use. We need **your feedback**! You can follow the development on the [`dev`](https://github.com/daneden/animate.css/tree/dev) branch and give your feedback on the [issue tracker](https://github.com/daneden/animate.css/issues).
|
||||
**Every feedback is welcome!**
|
||||
|
||||
_Just-add-water CSS animation_
|
||||
|
||||
`animate.css` is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.
|
||||
[![GitHub Version](https://img.shields.io/github/release/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![Github Star](https://img.shields.io/github/stars/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![Github Fork](https://img.shields.io/github/forks/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![License](https://img.shields.io/github/license/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css)
|
||||
|
||||
## _Just-add-water CSS animation_
|
||||
|
||||
## Installation
|
||||
|
||||
Install via npm:
|
||||
Install with npm:
|
||||
|
||||
```bash
|
||||
$ npm install animate.css --save
|
||||
```shell
|
||||
npm install animate.css --save
|
||||
```
|
||||
|
||||
or yarn:
|
||||
Install with yarn:
|
||||
|
||||
```bash
|
||||
$ yarn add animate.css
|
||||
```shell
|
||||
yarn add animate.css
|
||||
```
|
||||
|
||||
## Getting started
|
||||
|
||||
## Usage
|
||||
|
||||
To use animate.css in your website, simply drop the stylesheet into your document's `<head>`, and add the class `animated` to an element, along with any of the animation names. That's it! You've got a CSS animated element. Super!
|
||||
|
||||
```html
|
||||
<head>
|
||||
<link rel="stylesheet" href="animate.min.css">
|
||||
</head>
|
||||
```
|
||||
|
||||
or use a CDN hosted version by [CDNJS](https://cdnjs.com/libraries/animate.css)
|
||||
|
||||
```html
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
|
||||
</head>
|
||||
```
|
||||
|
||||
|
||||
### Animations
|
||||
|
||||
To animate an element, add the class `animated` to an element. You can include the class `infinite` for an infinite loop. Finally you need to add one of the following classes to the element:
|
||||
|
||||
| Class Name | | | |
|
||||
| ----------------- | ------------------ | ------------------- | -------------------- |
|
||||
| `bounce` | `flash` | `pulse` | `rubberBand` |
|
||||
| `shake` | `headShake` | `swing` | `tada` |
|
||||
| `wobble` | `jello` | `bounceIn` | `bounceInDown` |
|
||||
| `bounceInLeft` | `bounceInRight` | `bounceInUp` | `bounceOut` |
|
||||
| `bounceOutDown` | `bounceOutLeft` | `bounceOutRight` | `bounceOutUp` |
|
||||
| `fadeIn` | `fadeInDown` | `fadeInDownBig` | `fadeInLeft` |
|
||||
| `fadeInLeftBig` | `fadeInRight` | `fadeInRightBig` | `fadeInUp` |
|
||||
| `fadeInUpBig` | `fadeOut` | `fadeOutDown` | `fadeOutDownBig` |
|
||||
| `fadeOutLeft` | `fadeOutLeftBig` | `fadeOutRight` | `fadeOutRightBig` |
|
||||
| `fadeOutUp` | `fadeOutUpBig` | `flipInX` | `flipInY` |
|
||||
| `flipOutX` | `flipOutY` | `lightSpeedIn` | `lightSpeedOut` |
|
||||
| `rotateIn` | `rotateInDownLeft` | `rotateInDownRight` | `rotateInUpLeft` |
|
||||
| `rotateInUpRight` | `rotateOut` | `rotateOutDownLeft` | `rotateOutDownRight` |
|
||||
| `rotateOutUpLeft` | `rotateOutUpRight` | `hinge` | `jackInTheBox` |
|
||||
| `rollIn` | `rollOut` | `zoomIn` | `zoomInDown` |
|
||||
| `zoomInLeft` | `zoomInRight` | `zoomInUp` | `zoomOut` |
|
||||
| `zoomOutDown` | `zoomOutLeft` | `zoomOutRight` | `zoomOutUp` |
|
||||
| `slideInDown` | `slideInLeft` | `slideInRight` | `slideInUp` |
|
||||
| `slideOutDown` | `slideOutLeft` | `slideOutRight` | `slideOutUp` |
|
||||
| `heartBeat` |
|
||||
|
||||
Full example:
|
||||
|
||||
```html
|
||||
<h1 class="animated infinite bounce delay-2s">Example</h1>
|
||||
```
|
||||
|
||||
[Check out all the animations here!](https://daneden.github.io/animate.css/)
|
||||
|
||||
It's possible to change the duration of your animations, add a delay or change the number of times that it plays:
|
||||
|
||||
```css
|
||||
.yourElement {
|
||||
animation-duration: 3s;
|
||||
animation-delay: 2s;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
```
|
||||
|
||||
## Usage with Javascript
|
||||
|
||||
You can do a whole bunch of other stuff with animate.css when you combine it with Javascript. A simple example:
|
||||
|
||||
```javascript
|
||||
const element = document.querySelector('.my-element')
|
||||
element.classList.add('animated', 'bounceOutLeft')
|
||||
```
|
||||
|
||||
You can also detect when an animation ends:
|
||||
|
||||
```javascript
|
||||
const element = document.querySelector('.my-element')
|
||||
element.classList.add('animated', 'bounceOutLeft')
|
||||
|
||||
element.addEventListener('animationend', function() { doSomething() })
|
||||
```
|
||||
|
||||
You can use this simple function to add and remove the animations:
|
||||
|
||||
```javascript
|
||||
function animateCSS(element, animationName, callback) {
|
||||
const node = document.querySelector(element)
|
||||
node.classList.add('animated', animationName)
|
||||
|
||||
function handleAnimationEnd() {
|
||||
node.classList.remove('animated', animationName)
|
||||
node.removeEventListener('animationend', handleAnimationEnd)
|
||||
|
||||
if (typeof callback === 'function') callback()
|
||||
}
|
||||
|
||||
node.addEventListener('animationend', handleAnimationEnd)
|
||||
}
|
||||
```
|
||||
|
||||
And use it like this:
|
||||
|
||||
```javascript
|
||||
animateCSS('.my-element', 'bounce')
|
||||
|
||||
// or
|
||||
animateCSS('.my-element', 'bounce', function() {
|
||||
// Do something after animation
|
||||
})
|
||||
```
|
||||
|
||||
Notice that the examples are using ES6's `const` declaration, dropping support for IE10 and some aging browsers. If you prefer, switch the `const` to `var` declarations and IE10 and some old browsers will get support (they still have to provide [classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList) support, so do your [research](https://caniuse.com/#feat=classlist)).
|
||||
|
||||
## Setting _Delay_ and _Speed_
|
||||
|
||||
### Delay Class
|
||||
|
||||
It's possible to add delays directly on the element's class attribute, just like this:
|
||||
|
||||
```html
|
||||
<div class="animated bounce delay-2s">Example</div>
|
||||
```
|
||||
|
||||
| Class Name | Delay Time |
|
||||
| ---------- | ---------- |
|
||||
| `delay-1s` | `1s` |
|
||||
| `delay-2s` | `2s` |
|
||||
| `delay-3s` | `3s` |
|
||||
| `delay-4s` | `4s` |
|
||||
| `delay-5s` | `5s` |
|
||||
|
||||
> _**Note**: The default delays are from 1 second to 5 seconds only. If you need custom delays, add it directly to your own CSS code._
|
||||
|
||||
### Slow, Slower, Fast, and Faster Class
|
||||
|
||||
It's possible to control the speed of the animation by adding these classes, as a sample below:
|
||||
|
||||
```html
|
||||
<div class="animated bounce faster">Example</div>
|
||||
```
|
||||
|
||||
| Class Name | Speed Time |
|
||||
| ---------- | ---------- |
|
||||
| `slow` | `2s` |
|
||||
| `slower` | `3s` |
|
||||
| `fast` | `800ms` |
|
||||
| `faster` | `500ms` |
|
||||
|
||||
> _**Note**: The `animated` class has a default speed of `1s`. If you need custom duration, add it directly to your own CSS code._
|
||||
|
||||
## Custom Builds
|
||||
|
||||
Animate.css is powered by [gulp.js](https://gulpjs.com/), which means you can create custom builds pretty easily. First of all, you’ll need Gulp and all other dependencies:
|
||||
|
||||
```sh
|
||||
$ cd path/to/animate.css/
|
||||
$ npm install
|
||||
```
|
||||
|
||||
Next, run `npx gulp` to compile your custom builds. For example, if you want only some of the “attention seekers”, simply edit the `animate-config.json` file to select only the animations you want to use.
|
||||
|
||||
```javascript
|
||||
"attention_seekers": {
|
||||
"bounce": true,
|
||||
"flash": false,
|
||||
"pulse": false,
|
||||
"shake": true,
|
||||
"headShake": true,
|
||||
"swing": true,
|
||||
"tada": true,
|
||||
"wobble": true,
|
||||
"jello":true
|
||||
}
|
||||
```
|
||||
You can find the Animate.css documentation on the [website](http://daneden.github.io/animate.css).
|
||||
|
||||
## Accessibility
|
||||
|
||||
Animate.css supports the [`prefers-reduced-motion` media query](https://webkit.org/blog/7551/responsive-design-for-motion/) so that users with motion sensitivity can opt out of animations. On supported platforms (currently all the majors browsers and OS), users can select "reduce motion" on their operating system preferences and it will turn off CSS transitions for them without any further work required.
|
||||
|
||||
## Core team
|
||||
|
||||
| ![](https://avatars2.githubusercontent.com/u/439365?s=460&u=512b4cc5324938ae40bbb8f3b7769d335953cd3a&v=4) | ![](https://avatars2.githubusercontent.com/u/5007208?s=460&u=418401ee605824272e5dcb955fd64ea24546a857&v=4) | ![](https://avatars1.githubusercontent.com/u/15052701?s=460&u=9e58364978379536d3f26c4ce5cae1a2a449a0e4&v=4) |
|
||||
| --- | --- | --- |
|
||||
| [Daniel Eden](https://github.com/daneden) | [Elton Mesquita](https://github.com/eltonmesquita) | [Waren Gonzaga](https://github.com/WarenGonzaga) |
|
||||
| Animate.css creator | Maintainer | Core contributor |
|
||||
|
||||
## License
|
||||
|
||||
Animate.css is licensed under the MIT license. (https://opensource.org/licenses/MIT)
|
||||
Animate.css is licensed under the MIT license. <https://opensource.org/licenses/MIT>
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
{
|
||||
"attention_seekers": {
|
||||
"bounce": true,
|
||||
"flash": true,
|
||||
"pulse": true,
|
||||
"rubberBand": true,
|
||||
"shake": true,
|
||||
"headShake": true,
|
||||
"swing": true,
|
||||
"tada": true,
|
||||
"wobble": true,
|
||||
"jello": true,
|
||||
"heartBeat": true
|
||||
},
|
||||
|
||||
"bouncing_entrances": {
|
||||
"bounceIn": true,
|
||||
"bounceInDown": true,
|
||||
"bounceInLeft": true,
|
||||
"bounceInRight": true,
|
||||
"bounceInUp": true
|
||||
},
|
||||
|
||||
"bouncing_exits": {
|
||||
"bounceOut": true,
|
||||
"bounceOutDown": true,
|
||||
"bounceOutLeft": true,
|
||||
"bounceOutRight": true,
|
||||
"bounceOutUp": true
|
||||
},
|
||||
|
||||
"fading_entrances": {
|
||||
"fadeIn": true,
|
||||
"fadeInDown": true,
|
||||
"fadeInDownBig": true,
|
||||
"fadeInLeft": true,
|
||||
"fadeInLeftBig": true,
|
||||
"fadeInRight": true,
|
||||
"fadeInRightBig": true,
|
||||
"fadeInUp": true,
|
||||
"fadeInUpBig": true
|
||||
},
|
||||
|
||||
"fading_exits": {
|
||||
"fadeOut": true,
|
||||
"fadeOutDown": true,
|
||||
"fadeOutDownBig": true,
|
||||
"fadeOutLeft": true,
|
||||
"fadeOutLeftBig": true,
|
||||
"fadeOutRight": true,
|
||||
"fadeOutRightBig": true,
|
||||
"fadeOutUp": true,
|
||||
"fadeOutUpBig": true
|
||||
},
|
||||
|
||||
"flippers": {
|
||||
"flip": true,
|
||||
"flipInX": true,
|
||||
"flipInY": true,
|
||||
"flipOutX": true,
|
||||
"flipOutY": true
|
||||
},
|
||||
|
||||
"lightspeed": {
|
||||
"lightSpeedIn": true,
|
||||
"lightSpeedOut": true
|
||||
},
|
||||
|
||||
"rotating_entrances": {
|
||||
"rotateIn": true,
|
||||
"rotateInDownLeft": true,
|
||||
"rotateInDownRight": true,
|
||||
"rotateInUpLeft": true,
|
||||
"rotateInUpRight": true
|
||||
},
|
||||
|
||||
"rotating_exits": {
|
||||
"rotateOut": true,
|
||||
"rotateOutDownLeft": true,
|
||||
"rotateOutDownRight": true,
|
||||
"rotateOutUpLeft": true,
|
||||
"rotateOutUpRight": true
|
||||
},
|
||||
|
||||
"specials": {
|
||||
"hinge": true,
|
||||
"jackInTheBox": true,
|
||||
"rollIn": true,
|
||||
"rollOut": true
|
||||
},
|
||||
|
||||
"zooming_entrances": {
|
||||
"zoomIn": true,
|
||||
"zoomInDown": true,
|
||||
"zoomInLeft": true,
|
||||
"zoomInRight": true,
|
||||
"zoomInUp": true
|
||||
},
|
||||
|
||||
"zooming_exits": {
|
||||
"zoomOut": true,
|
||||
"zoomOutDown": true,
|
||||
"zoomOutLeft": true,
|
||||
"zoomOutRight": true,
|
||||
"zoomOutUp": true
|
||||
},
|
||||
|
||||
"sliding_entrances": {
|
||||
"slideInDown": true,
|
||||
"slideInLeft": true,
|
||||
"slideInRight": true,
|
||||
"slideInUp": true
|
||||
},
|
||||
|
||||
"sliding_exits": {
|
||||
"slideOutDown": true,
|
||||
"slideOutLeft": true,
|
||||
"slideOutRight": true,
|
||||
"slideOutUp": true
|
||||
}
|
||||
}
|
9
animate.compat.css
Normal file
9
animate.compat.css
Normal file
File diff suppressed because one or more lines are too long
1729
animate.css
vendored
1729
animate.css
vendored
File diff suppressed because it is too large
Load diff
10
animate.min.css
vendored
Normal file → Executable file
10
animate.min.css
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"name": "animate.css",
|
||||
"main": "./animate.css",
|
||||
"ignore": [".*", "*.yml", "Gemfile", "Gemfile.lock", "*.md"]
|
||||
}
|
9
docs/animate.min.css
vendored
Normal file
9
docs/animate.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1303
docs/index.html
Normal file
1303
docs/index.html
Normal file
File diff suppressed because it is too large
Load diff
14
docs/main.mjs
Normal file
14
docs/main.mjs
Normal file
|
@ -0,0 +1,14 @@
|
|||
import buildDocsIndex from './modules/buildDocsIndex.mjs';
|
||||
import playground from './modules/playground.mjs';
|
||||
import startAnimations from './modules/startAnimations.mjs';
|
||||
import toggleOnClick from './modules/toggle.mjs';
|
||||
|
||||
buildDocsIndex();
|
||||
playground();
|
||||
|
||||
toggleOnClick('.callout-showList', 'html', 'animationList-active');
|
||||
toggleOnClick('.callout-hideList', 'html', 'animationList-active');
|
||||
toggleOnClick('.hamburger', 'html', 'hamburger-active');
|
||||
toggleOnClick('.docs-index', 'html', 'hamburger-active');
|
||||
|
||||
requestAnimationFrame(startAnimations);
|
37
docs/modules/buildDocsIndex.mjs
Normal file
37
docs/modules/buildDocsIndex.mjs
Normal file
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
Docs index
|
||||
*/
|
||||
|
||||
const indexItemTemplate = (item = '', id) => `
|
||||
<li class="docs-indexItem"><a href="#${id}" title="${item}">${item}</a></li>
|
||||
`
|
||||
|
||||
const indexList = (sections = [], container = '.sidebar', heading = 'h2') => {
|
||||
const containerEl = document.querySelector(container)
|
||||
const list = document.createElement('ul')
|
||||
|
||||
const children = sections.map(section => {
|
||||
const title = section.querySelector(heading)
|
||||
const id = section.getAttribute('id')
|
||||
|
||||
return title && indexItemTemplate(title.innerText, id)
|
||||
})
|
||||
|
||||
list.classList.add('docs-index')
|
||||
list.innerHTML = children.join('\n')
|
||||
|
||||
containerEl.insertAdjacentElement('beforeend', list)
|
||||
|
||||
return list
|
||||
}
|
||||
|
||||
const buildDocsIndex = (docs = '#documentation', docSection = '[class*="docSection-"]', titles = 'h2') => {
|
||||
const docsEl = document.querySelector(docs)
|
||||
const sections = [...docsEl.querySelectorAll(docSection)]
|
||||
|
||||
const list = indexList(sections)
|
||||
|
||||
return list
|
||||
}
|
||||
|
||||
export default buildDocsIndex
|
46
docs/modules/playground.mjs
Normal file
46
docs/modules/playground.mjs
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
Animation playground
|
||||
*/
|
||||
|
||||
const clearAll = (items = [], className = 'active') => {
|
||||
items.forEach((item) => item.classList.remove(className));
|
||||
};
|
||||
|
||||
const setEndListener = (target, defaultClass) => {
|
||||
target.addEventListener('animationend', (e) => {
|
||||
target.setAttribute('class', defaultClass);
|
||||
document.documentElement.classList.remove('isPlaying');
|
||||
});
|
||||
};
|
||||
|
||||
const playground = (
|
||||
container = '.animation-list',
|
||||
item = '.animation-item',
|
||||
target = '.callout-title',
|
||||
) => {
|
||||
const containerEl = document.querySelector(container);
|
||||
const items = [...containerEl.querySelectorAll(item)];
|
||||
const targetEl = document.querySelector(target);
|
||||
|
||||
setEndListener(targetEl, target.replace('.', ''));
|
||||
|
||||
containerEl.addEventListener('click', (e) => {
|
||||
const el = e.target
|
||||
|
||||
if(el.classList.contains('animation-item--title')) {
|
||||
clearAll(items);
|
||||
const animation = `animate__${el.parentElement.getAttribute('data-animation')}`;
|
||||
|
||||
targetEl.classList.add('animate__animated', animation);
|
||||
document.documentElement.classList.add('isPlaying');
|
||||
document.documentElement.classList.remove('animationList-active');
|
||||
}
|
||||
|
||||
if (el.classList.contains('copy-icon')) {
|
||||
const animation = `animate__${el.parentElement.getAttribute('data-animation')}`;
|
||||
navigator.clipboard.writeText(animation);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default playground;
|
18
docs/modules/slowDownAnimations.mjs
Normal file
18
docs/modules/slowDownAnimations.mjs
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
Slows animations
|
||||
*/
|
||||
|
||||
const slowDownAnimations = (target) => {
|
||||
const targetEl = document.querySelector(target)
|
||||
const doc = document.documentElement
|
||||
|
||||
targetEl.addEventListener('click', () => {
|
||||
const currentDuration = getComputedStyle(document.documentElement)
|
||||
.getPropertyValue('--animate-duration')
|
||||
const newDuration = currentDuration === '1s' ? '2s' : '1s'
|
||||
|
||||
document.documentElement.style.setProperty('--animate-duration', newDuration);
|
||||
})
|
||||
}
|
||||
|
||||
export default slowDownAnimations
|
23
docs/modules/startAnimations.mjs
Normal file
23
docs/modules/startAnimations.mjs
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
Intro animation
|
||||
*/
|
||||
|
||||
const startAnimation = () => {
|
||||
const title = document.querySelector('.callout-title')
|
||||
const subTitle = document.querySelector('.callout-subtitle')
|
||||
const sidebar = document.querySelector('.animation-list')
|
||||
const button = document.querySelector('.callout-showList')
|
||||
|
||||
|
||||
const titleAnimation = 'zoomInDown'
|
||||
const subTitleAnimation = 'zoomInDown'
|
||||
const buttonAnimation = 'zoomInUp'
|
||||
const sidebarAnimation = 'fadeInRight'
|
||||
|
||||
title.classList.add('animate__animated', `animate__${titleAnimation}`)
|
||||
subTitle.classList.add('animate__animated', `animate__${subTitleAnimation}`)
|
||||
button.classList.add('animate__animated', `animate__${buttonAnimation}`)
|
||||
sidebar.classList.add('animate__animated', `animate__${sidebarAnimation}`)
|
||||
}
|
||||
|
||||
export default startAnimation
|
14
docs/modules/toggle.mjs
Normal file
14
docs/modules/toggle.mjs
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
Mobile animation list
|
||||
*/
|
||||
|
||||
const toggleOnClick = (el, target, className) => {
|
||||
const element = document.querySelector(el)
|
||||
const targetEl = document.querySelector(target)
|
||||
|
||||
element.addEventListener('click', e => {
|
||||
targetEl.classList.toggle(className)
|
||||
})
|
||||
}
|
||||
|
||||
export default toggleOnClick
|
604
docs/style.css
Normal file
604
docs/style.css
Normal file
|
@ -0,0 +1,604 @@
|
|||
/*-----------------------------------*\
|
||||
$BASE
|
||||
\*-----------------------------------*/
|
||||
|
||||
:root {
|
||||
--c-main: #351c75;
|
||||
--c-secondary: #e69138;
|
||||
--c-dark: #333;
|
||||
--c-background: #fce5cd;
|
||||
--c-background-dark: #f7d7b5;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
|
||||
color: var(--c-dark);
|
||||
font-size: 100%;
|
||||
font-family: 'Work Sans', sans-serif;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 700px) {
|
||||
html {
|
||||
font-size: 112.5%;
|
||||
line-height: 1.35;
|
||||
}
|
||||
}
|
||||
|
||||
*,
|
||||
* *,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
color: var(--c-main);
|
||||
}
|
||||
|
||||
pre,
|
||||
table {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 1em;
|
||||
background: var(--c-background);
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 1rem;
|
||||
|
||||
background-color: var(--c-dark);
|
||||
border-radius: 0.25em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: transparent;
|
||||
font-size: 0.8rem !important;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$TYPOGRAPHY
|
||||
\*-----------------------------------*/
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
hr,
|
||||
table,
|
||||
pre,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: var(--c-main);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.998rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.999rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.414rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$GENERICS
|
||||
\*-----------------------------------*/
|
||||
|
||||
.button {
|
||||
padding: 0.4em 1em;
|
||||
|
||||
color: var(--c-main);
|
||||
border-radius: 4px;
|
||||
border: 2px solid var(--c-main);
|
||||
background: transparent;
|
||||
|
||||
font-family: inherit;
|
||||
font-size: 0.9rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 6px solid var(--c-secondary);
|
||||
padding-left: 1rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$INTRO
|
||||
\*-----------------------------------*/
|
||||
|
||||
.intro {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: [callout] 1fr;
|
||||
grid-template-rows: 1fr auto;
|
||||
grid-column-gap: 0;
|
||||
grid-row-gap: 1rem;
|
||||
column-gap: 0;
|
||||
row-gap: 1rem;
|
||||
grid-template-areas:
|
||||
'callout animation-list'
|
||||
'footer aimation-list';
|
||||
|
||||
max-width: 100%;
|
||||
height: calc(100vh - 2.55rem);
|
||||
overflow: hidden;
|
||||
|
||||
background-color: var(--c-background);
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.intro {
|
||||
height: calc(100vh - 2.8rem);
|
||||
grid-column-gap: 1rem;
|
||||
column-gap: 1rem;
|
||||
grid-template-columns: [callout] 1fr [sidebar] 250px;
|
||||
}
|
||||
}
|
||||
|
||||
.callout {
|
||||
grid-area: callout;
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.callout-title {
|
||||
margin-bottom: 0;
|
||||
|
||||
animation-delay: 0.25s;
|
||||
|
||||
font-size: 4rem;
|
||||
font-size: min(14vw, 4rem);
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.callout-title {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
}
|
||||
|
||||
.callout-subtitle {
|
||||
margin-top: 0;
|
||||
|
||||
animation-delay: 0.3s;
|
||||
|
||||
color: var(--c-secondary);
|
||||
font-size: 1.3333rem;
|
||||
font-size: min(10vw, 1.3333rem);
|
||||
}
|
||||
|
||||
.callout-showList {
|
||||
margin-top: 2rem;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.callout-showList {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.callout-hideList {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.animation-list {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
height: 100%;
|
||||
z-index: 90;
|
||||
|
||||
grid-area: animation-list;
|
||||
grid-row: 1 / 3;
|
||||
overflow-y: auto;
|
||||
padding: 2rem;
|
||||
|
||||
animation-delay: 0.7s;
|
||||
animation-fill-mode: backwards;
|
||||
transition: transform 0.2s ease-out;
|
||||
|
||||
background-color: var(--c-background-dark);
|
||||
}
|
||||
|
||||
.animationList-active .animation-list {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.animation-list {
|
||||
position: relative;
|
||||
left: auto;
|
||||
transform: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.intro-footer {
|
||||
grid-area: footer;
|
||||
justify-self: center;
|
||||
padding-bottom: 1rem;
|
||||
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.animation-item {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
bottom: calc(100% + 0.76em);
|
||||
right: -1em;
|
||||
padding: 0.5em 0.75em;
|
||||
|
||||
background-color: var(--c-main);
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.tooltip::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 1.1em;
|
||||
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
border-style: solid;
|
||||
border-width: 6px 4px 0 4px;
|
||||
border-color: var(--c-main) transparent transparent transparent;
|
||||
}
|
||||
|
||||
.copy-icon {
|
||||
position: relative;
|
||||
width: 6px;
|
||||
height: 10px;
|
||||
align-self: center;
|
||||
|
||||
background-color: transparent;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 477.867 477.867'%3E%3Cpath d='M341.333 85.333H51.2c-28.277 0-51.2 22.923-51.2 51.2v290.133c0 28.277 22.923 51.2 51.2 51.2h290.133c28.277 0 51.2-22.923 51.2-51.2V136.533c0-28.277-22.923-51.2-51.2-51.2zM358.4 426.667c0 9.426-7.641 17.067-17.067 17.067H51.2c-9.426 0-17.067-7.641-17.067-17.067V136.533c0-9.426 7.641-17.067 17.067-17.067h290.133c9.426 0 17.067 7.641 17.067 17.067v290.134z'/%3E%3Cpath d='M426.667 0h-307.2c-28.277 0-51.2 22.923-51.2 51.2 0 9.426 7.641 17.067 17.067 17.067S102.4 60.626 102.4 51.2s7.641-17.067 17.067-17.067h307.2c9.426 0 17.067 7.641 17.067 17.067v307.2c0 9.426-7.641 17.067-17.067 17.067s-17.067 7.641-17.067 17.067 7.641 17.067 17.067 17.067c28.277 0 51.2-22.923 51.2-51.2V51.2c0-28.277-22.923-51.2-51.2-51.2z'/%3E%3C/svg%3E");
|
||||
background-position: right bottom;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 10px;
|
||||
|
||||
visibility: hidden;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.animation-item:hover .copy-icon {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.copy-icon:hover .tooltip {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.animation-group,
|
||||
.animation-title {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.animation-title {
|
||||
margin-bottom: 0.2em;
|
||||
|
||||
color: var(--c-dark);
|
||||
}
|
||||
|
||||
.animation-group {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
list-style: none;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$DOCS
|
||||
\*-----------------------------------*/
|
||||
|
||||
.container {
|
||||
gap: 1rem;
|
||||
margin: 0 auto;
|
||||
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-rows: 1fr;
|
||||
grid-template-columns: calc(100% - 300px - 1rem) 300px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1520px) {
|
||||
.container {
|
||||
grid-template-rows: 1fr;
|
||||
grid-template-columns: 1fr 1100px 2fr;
|
||||
}
|
||||
}
|
||||
|
||||
.docs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.docs-header {
|
||||
position: relative;
|
||||
padding: 0.5rem 0;
|
||||
|
||||
background-color: var(--c-main);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.docs-mainTitle {
|
||||
grid-column: 1 / 2;
|
||||
padding-left: 1rem;
|
||||
margin-top: 0;
|
||||
|
||||
font-size: 1.3333rem;
|
||||
}
|
||||
|
||||
.docs-mainTitle a {
|
||||
color: var(--c-secondary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (min-width: 1520px) {
|
||||
.docs-mainTitle {
|
||||
grid-column: 2 / 3;
|
||||
}
|
||||
}
|
||||
|
||||
.meta {
|
||||
padding-left: 2rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1520px) {
|
||||
.content {
|
||||
grid-column: 2 / 3;
|
||||
}
|
||||
}
|
||||
|
||||
.hamburger {
|
||||
--size: 30px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: sticky;
|
||||
top: 2rem;
|
||||
left: 100%;
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
|
||||
background-color: var(--c-secondary);
|
||||
transition: transform 0.2s ease-out;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hamburger-active .hamburger {
|
||||
transform: translateX(-240px);
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.hamburger {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
z-index: 100;
|
||||
|
||||
width: 240px;
|
||||
height: 100%;
|
||||
padding-right: 1rem;
|
||||
|
||||
background: var(--c-background-dark);
|
||||
transition: transform 0.2s ease-out;
|
||||
}
|
||||
|
||||
.hamburger-active .sidebar {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.sidebar {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.hamburger-active .sidebar {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-github {
|
||||
display: inline-block;
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.docs-index {
|
||||
top: 1rem;
|
||||
padding-left: 2rem;
|
||||
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.docs-index {
|
||||
position: sticky;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-indexItem {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.edit-github {
|
||||
font-size: 0.75rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
[class*='docSection'] {
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
[class*='docSection']:last-of-type {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
.docSection-contributors table {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.docSection-contributors table th,
|
||||
.docSection-contributors table td {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.docSection-contributors table img {
|
||||
width: 150px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$FOOTER
|
||||
\*-----------------------------------*/
|
||||
|
||||
.main-footer {
|
||||
padding: 1rem;
|
||||
|
||||
background-color: var(--c-main);
|
||||
color: #fff;
|
||||
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.main-footer p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.main-footer a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*-----------------------------------*\
|
||||
$REDUCED MOTION BANNER
|
||||
\*-----------------------------------*/
|
||||
|
||||
.motionless__banner a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.motionless__banner {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 150;
|
||||
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border-top: 2px solid #ff5722;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.motionless__paragraph {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (print), (prefers-reduced-motion: reduce) {
|
||||
.motionless__banner {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.docs {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.animation-list {
|
||||
text-align: left;
|
||||
}
|
66
docsSource/compileAnimationList.js
Normal file
66
docsSource/compileAnimationList.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
/**
|
||||
* Get and categorize all the animation names and compile
|
||||
* to HTML lists
|
||||
* @param {string} dir - directory containing the css file
|
||||
* @param {string} file - css file name
|
||||
*/
|
||||
|
||||
function compileAnimationlist(dir = '../source', file = 'animate.css') {
|
||||
const filePath = path.join(__dirname, dir, file);
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
const globalRegex = /\/(.*)\w/g;
|
||||
const itemRegex = /(\/)(.*)(\.)/;
|
||||
|
||||
const rawList = content.match(globalRegex);
|
||||
let currentGroup;
|
||||
let list = {};
|
||||
|
||||
rawList.forEach((i) => {
|
||||
const item = i.match(itemRegex);
|
||||
|
||||
if (item == null) {
|
||||
const title = i.replace('/* ', '');
|
||||
currentGroup = title;
|
||||
list[title] = [];
|
||||
|
||||
return currentGroup;
|
||||
}
|
||||
|
||||
return list[currentGroup].push(item[2]);
|
||||
}, {});
|
||||
|
||||
const itemTemplate = (item) => `
|
||||
<li class="animation-item" data-animation="${item}">
|
||||
<span class="animation-item--title">${item}</span>
|
||||
<button class="copy-icon" type="button">
|
||||
<span class="tooltip">Copy class name to clipboard</span>
|
||||
</button>
|
||||
</li>`;
|
||||
|
||||
const listTemplate = (title, items) => {
|
||||
const parsedTitle = title.toLowerCase().replace(' ', '_');
|
||||
|
||||
return `
|
||||
<section class="${parsedTitle}" id="${parsedTitle}">
|
||||
<h3 class="animation-title">${title}</h3>
|
||||
<ul class="animation-group">${items.join('\n')}</ul>
|
||||
</section>
|
||||
`;
|
||||
};
|
||||
|
||||
const compile = (list) => {
|
||||
const titles = Object.keys(list);
|
||||
|
||||
return titles.map((title) => {
|
||||
const items = list[title].map((item) => itemTemplate(item));
|
||||
return listTemplate(title, items);
|
||||
});
|
||||
};
|
||||
|
||||
return compile(list).join('\n');
|
||||
}
|
||||
|
||||
module.exports = compileAnimationlist;
|
43
docsSource/compileMD.js
Normal file
43
docsSource/compileMD.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const md = require('markdown-it')({
|
||||
html: true,
|
||||
linkify: true,
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets all the markdown files on a folder, compile them to html and returns
|
||||
* @param {string} dir - folder containing all the .md files
|
||||
*/
|
||||
|
||||
function compileMD(dir = 'sections') {
|
||||
const directory = path.join(__dirname, dir);
|
||||
const files = fs.readdirSync(directory).sort();
|
||||
|
||||
const sectionTemplate = (file, content) => {
|
||||
const message = 'Edit this on Github';
|
||||
const fileName = file.replace('.md', '').match(/([a-z])\w+/)[0];
|
||||
const editURL = `https://github.com/daneden/animate.css/tree/master/source/docsSource/sections/${file}`;
|
||||
const parsedContent = md.render(content);
|
||||
|
||||
return `
|
||||
<section class="docSection-${fileName}" id="${fileName}">
|
||||
${parsedContent}
|
||||
<p class="edit-github"><a href="${editURL}" title="${message}">${message}</a></p>
|
||||
</section>
|
||||
`;
|
||||
};
|
||||
|
||||
const readMD = (file) => {
|
||||
const filePath = path.join(__dirname, dir, file);
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
|
||||
return sectionTemplate(file, content);
|
||||
};
|
||||
|
||||
const filesContent = files.map((section) => readMD(section));
|
||||
|
||||
return filesContent.join('\n');
|
||||
}
|
||||
|
||||
module.exports = compileMD;
|
25
docsSource/index.js
Normal file
25
docsSource/index.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const {version} = JSON.parse(fs.readFileSync('package.json'));
|
||||
const compileMD = require('./compileMD');
|
||||
const compileAnimationList = require('./compileAnimationList');
|
||||
|
||||
const templatePath = path.join(__dirname, 'template.html');
|
||||
const template = fs.readFileSync(templatePath, 'utf8');
|
||||
const outputPath = '../docs';
|
||||
const outputFile = 'index.html';
|
||||
|
||||
const docs = compileMD();
|
||||
const list = compileAnimationList();
|
||||
|
||||
const output = path.join(__dirname, outputPath, outputFile);
|
||||
|
||||
const withDocs = template.replace('{{docs}}', docs);
|
||||
const withListAndDocs = withDocs.replace('{{list}}', list);
|
||||
const withVersion = withListAndDocs.replace('{{version}}', version);
|
||||
|
||||
fs.writeFile(output, withVersion, 'utf8', (err) => {
|
||||
if (err) console.error(err);
|
||||
console.log('Template compiled succesfully.');
|
||||
});
|
3
docsSource/sections/00-intro.md
Normal file
3
docsSource/sections/00-intro.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
> Animate.css v4 brought some **breaking changes**, please refer to the [migration guide](#migration) before updating from v3.x and under.
|
||||
|
||||
**Animate.css** is a library of ready-to-use, cross-browser animations for use in your web projects. Great for emphasis, home pages, sliders, and attention-guiding hints.
|
87
docsSource/sections/01-usage.md
Normal file
87
docsSource/sections/01-usage.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
## Installation and usage
|
||||
|
||||
### Installing
|
||||
|
||||
Install with npm:
|
||||
|
||||
```shell
|
||||
$ npm install animate.css --save
|
||||
```
|
||||
|
||||
with yarn:
|
||||
|
||||
```shell
|
||||
$ yarn add animate.css
|
||||
```
|
||||
|
||||
or add it directly to your webpage using a CDN:
|
||||
|
||||
```html
|
||||
<head>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
|
||||
/>
|
||||
</head>
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
|
||||
After installing Animate.css, add the class `animate__animated` to an element, along with any of the [animation names](#attention_seekers) (don't forget the `animate__` prefix!):
|
||||
|
||||
```html
|
||||
<h1 class="animate__animated animate__bounce">An animated element</h1>
|
||||
```
|
||||
|
||||
That's it! You've got a CSS animated element. Super!
|
||||
|
||||
> Animations can improve the UX of an interface, but keep in mind that they can also get in the way of your users! Please read the [best practices](#best-practices) and [gotchas](#gotchas) sections to bring your web-things to life in the best way possible.
|
||||
|
||||
#### Using `@keyframes`
|
||||
|
||||
Even though the library provides you a few helper classes like the `animated` class to get you up running quickly, you can use the provided animations `keyframes` directly. This provides a flexible way to use Animate.css with your current projects without having to refactor your HTML code.
|
||||
|
||||
Example:
|
||||
|
||||
```css
|
||||
.my-element {
|
||||
display: inline-block;
|
||||
margin: 0 0.5rem;
|
||||
|
||||
animation: bounce; /* referring directly to the animation's @keyframe declaration */
|
||||
animation-duration: 2s; /* don't forget to set a duration! */
|
||||
}
|
||||
```
|
||||
|
||||
Be aware that some animations are dependent on the `animation-timing` property set on the animation's class. Changing or not declaring it might lead to unexpected results.
|
||||
|
||||
#### CSS Custom Properties (CSS Variables)
|
||||
|
||||
Since version 4, Animate.css makes use of custom properties (also known as CSS variables) to define the animations duration, delay, and iteractions. This makes Animate.css very flexible and customizable. Need to change an animation duration? Just set a new value to globally or locally.
|
||||
|
||||
Example:
|
||||
|
||||
```css
|
||||
/* This only changes this particular animation duration */
|
||||
.animate__animated.animate__bounce {
|
||||
--animate-duration: 2s;
|
||||
}
|
||||
|
||||
/* This changes all the animations globaly */
|
||||
:root {
|
||||
--animate-duration: 800ms;
|
||||
--animation-delay: 0.9s;
|
||||
}
|
||||
```
|
||||
|
||||
Custom properties also make it easy to change all your animations time-constrained properties on the fly. It means that you can have a slow-motion or time-lapse effect with a javascript one-liner:
|
||||
|
||||
```javascript
|
||||
// All animations will take twice the time to accomplish
|
||||
document.documentElement.style.setProperty('--animate-duration', '2s');
|
||||
|
||||
// All animations will take half the time to accomplish
|
||||
document.documentElement.style.setProperty('--animate-duration', '.5s');
|
||||
```
|
||||
|
||||
Even though custom properties are not supported by some aging browsers, Animate.css provides a proper fallback, widening its support for any browser that supports CSS animations.
|
90
docsSource/sections/02-utilities.md
Normal file
90
docsSource/sections/02-utilities.md
Normal file
|
@ -0,0 +1,90 @@
|
|||
## Utility classes
|
||||
|
||||
Animate.css comes packed with a few utility classes to simplify its use.
|
||||
|
||||
### Delay classes
|
||||
|
||||
You can add delays directly on the element's class attribute, just like this:
|
||||
|
||||
```html
|
||||
<div class="animate__animated animate__bounce animate__delay-2s">Example</div>
|
||||
```
|
||||
|
||||
Animate.css provides the following delays:
|
||||
|
||||
| Class name | Default delay time |
|
||||
| ------------------- | ------------------ |
|
||||
| `animate__delay-2s` | `2s` |
|
||||
| `animate__delay-3s` | `3s` |
|
||||
| `animate__delay-4s` | `4s` |
|
||||
| `animate__delay-5s` | `5s` |
|
||||
|
||||
The provided delays are from 1 to 5 seconds. You can customize them setting the `--animate-delay` property to a longer or a shorter duration:
|
||||
|
||||
```css
|
||||
/* All delay classes will take 2x longer to start */
|
||||
:root {
|
||||
--animate-delay: 2s;
|
||||
}
|
||||
|
||||
/* All delay classes will take half the time to start */
|
||||
:root {
|
||||
--animate-delay: 0.5s;
|
||||
}
|
||||
```
|
||||
|
||||
### Slow, slower, fast, and Faster classes
|
||||
|
||||
You can control the speed of the animation by adding these classes, as below:
|
||||
|
||||
```html
|
||||
<div class="animate__animated animate__bounce animate__faster">Example</div>
|
||||
```
|
||||
|
||||
| Class name | Default speed time |
|
||||
| ----------------- | ------------------ |
|
||||
| `animate__slow` | `2s` |
|
||||
| `animate__slower` | `3s` |
|
||||
| `animate__fast` | `800ms` |
|
||||
| `animate__faster` | `500ms` |
|
||||
|
||||
The `animate__animated` class has a default speed of `1s`. You can also customize the animations duration through the `--animate-duration` property, globaly or locally. This will affect both the animations and the utility classes. Example:
|
||||
|
||||
```css
|
||||
/* All animations will take twice as long to finish */
|
||||
:root {
|
||||
--animation-duration: 2s;
|
||||
}
|
||||
|
||||
/* Only this element will take half the time to finish */
|
||||
.my-element {
|
||||
--animation-duration: 0.5s;
|
||||
}
|
||||
```
|
||||
|
||||
Notice that some animations have a duration of less than 1 second. As we used the CSS `calc()` function, setting the duration through the `--animation-duration` property will respect these ratios. So, when you change the global duration all the animations will respond to that change!
|
||||
|
||||
### Repeating classes
|
||||
|
||||
You can control the iteration count of the animation by adding these classes, like below:
|
||||
|
||||
```html
|
||||
<div class="animate__animated animate__bounce animate__repeat-2">Example</div>
|
||||
```
|
||||
|
||||
| Class Name | Default iteration count |
|
||||
| ------------------- | ----------------------- |
|
||||
| `animate__repeat-1` | `1` |
|
||||
| `animate__repeat-2` | `2` |
|
||||
| `animate__repeat-3` | `3` |
|
||||
|
||||
As with the repeat and speed classes, the `animate__repeat` class is based on the `--animate-repeat` property and has a default iteration count of `1`. You can customize them setting the `--animate-repeat` property to a longer or a shorter value:
|
||||
|
||||
```css
|
||||
/* The element will repeat the animation 2x
|
||||
It's better to set this property only locally and not globally or
|
||||
you might end up with a messy situation */
|
||||
.my-element {
|
||||
--animation-repeat: 2;
|
||||
}
|
||||
```
|
60
docsSource/sections/03-best-practices.md
Normal file
60
docsSource/sections/03-best-practices.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
## Best practices
|
||||
|
||||
Animations can greatly improve an interface's UX, but it's important to follow some guidelines to not overdo it and deteriorate the user experience on your web-things. Following the following rules should provide a good start.
|
||||
|
||||
### Meaningful animations
|
||||
|
||||
You should avoid animating an element just for the sake of it. Keep in mind that animations should make an intention clear. Animations like attention seekers (bounce, flash, pulse, etc) should be used to bring the user's attention to something special in your interface and not only as a way to bring "flashiness" to it.
|
||||
|
||||
Entrances and exit animations should be used to orientate what is happening in the interface, clearly signaling that it's transitioning into a new state.
|
||||
|
||||
It doesn't mean that you should avoid adding playfulness to the interface, just be sure that the animations are not getting in the way of your user and that the page's performance is not affected by an exaggerated use of animations.
|
||||
|
||||
### Don't animate large elements
|
||||
|
||||
Avoid it as it won't bring much value to the user and will probably only cause confusion. Besides that, there is a good chance that the animations will be junky, culminating in bad UX.
|
||||
|
||||
### Don't animate root elements
|
||||
|
||||
Animating the `<html/>` or `<body/>` tags is possible, but you should avoid it. There were some reports pointing out that this could trigger some weird browser bugs. Besides, making the whole page bounce would hardly provide good value to your UX. If you indeed need this sort of effect, wrap your page in an element and animate it, like this:
|
||||
|
||||
```html
|
||||
<body>
|
||||
<main class="animate__animated animate__fadeInLeft">
|
||||
<!-- Your code -->
|
||||
</main>
|
||||
</body>
|
||||
```
|
||||
|
||||
### Infinite animations should be avoided
|
||||
|
||||
Even tough Animate.css provides utility classes for repeating animations, including an infinite one, you should avoid endless animations. It will just distract your users and might annoy a good slice of them. So, use it wisely!
|
||||
|
||||
### Mind the initial and final state of your elements
|
||||
|
||||
All the Animate.css animations include a CSS property called `animation-fill-mode` which controls the states of an element before and after animation. You can read more about it [here](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode). Animate.css defaults to `animation-fill-mode: both`, but you can change it to suit your needs.
|
||||
|
||||
### Don't disable the `prefers-reduced-motion` media query
|
||||
|
||||
Since version 3.7.0 Animate.css supports the `prefers-reduced-motion` media query which disables animations based on the OS system's preference on supporting browsers (most current browsers support it). This is a **critical accessibility feature** and should never be disabled! This is built into browsers to help people with vestibular and seizure disorders. You can read more about it [here](https://css-tricks.com/revisiting-prefers-reduced-motion-the-reduced-motion-media-query/). If your web-thing needs the animations to function, warn users, but don't disable the feature. You can do it easily with CSS only. Here's a simple example:
|
||||
|
||||
<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="css,result" data-user="eltonmesquita" data-slug-hash="oNjGGbw" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Prefers-reduce-motion media query">
|
||||
<span>See the Pen <a href="https://codepen.io/eltonmesquita/pen/oNjGGbw">
|
||||
Prefers-reduce-motion media query</a> by Elton Mesquita (<a href="https://codepen.io/eltonmesquita">@eltonmesquita</a>)
|
||||
on <a href="https://codepen.io">CodePen</a>.</span>
|
||||
</p>
|
||||
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
|
||||
|
||||
<h2 id="gotchas">Gotchas</h2>
|
||||
|
||||
### You can't animate inline elements
|
||||
|
||||
Even though some browsers can animate inline elements, this goes against the CSS animation specs and will break on some browsers or eventually cease to work. Always animate block or inline-block level elements (grid and flex containers and children are block-level elements too). You can set an element to `display: inline-block` when animating an inline-level element.
|
||||
|
||||
### Overflow
|
||||
|
||||
Most of the Animate.css animations will move elements across the screen and might create scrollbars on your web-thing. This is manageable using the `overflow: hidden` property. There's no recipe to when and where to use it, but the basic idea is to use it in the parent holding the animated element. It's up to you to figure out when and how to use it, [this guide](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) can help you understand it.
|
||||
|
||||
### Intervals between repeats
|
||||
|
||||
Unfortunately, this isn't possible with pure CSS right now. You have to use Javascript to achieve this result.
|
62
docsSource/sections/04-javascript.md
Normal file
62
docsSource/sections/04-javascript.md
Normal file
|
@ -0,0 +1,62 @@
|
|||
## Usage with Javascript
|
||||
|
||||
You can do a whole bunch of other stuff with animate.css when you combine it with Javascript. A simple example:
|
||||
|
||||
```javascript
|
||||
const element = document.querySelector('.my-element');
|
||||
element.classList.add('animate__animated', 'animate__bounceOutLeft');
|
||||
```
|
||||
|
||||
You can detect when an animation ends:
|
||||
|
||||
```javascript
|
||||
const element = document.querySelector('.my-element');
|
||||
element.classList.add('animate__animated', 'animate__bounceOutLeft');
|
||||
|
||||
element.addEventListener('animationend', () => {
|
||||
// do something
|
||||
});
|
||||
```
|
||||
|
||||
or change its duration:
|
||||
|
||||
```javascript
|
||||
const element = document.querySelector('.my-element');
|
||||
element.style.setProperty('--animate-duration', '0.5s');
|
||||
```
|
||||
|
||||
You can also use a simple function to add the animations classes and remove them automatically:
|
||||
|
||||
```javascript
|
||||
const animateCSS = (element, animation, prefix = 'animate__') =>
|
||||
// We create a Promise and return it
|
||||
new Promise((resolve, reject) => {
|
||||
const animationName = `${prefix}${animation}`;
|
||||
const node = document.querySelector(element);
|
||||
|
||||
node.classList.add(`${prefix}animated`, animationName);
|
||||
|
||||
// When the animation ends, we clean the classes and resolve the Promise
|
||||
function handleAnimationEnd() {
|
||||
node.classList.remove(`${prefix}animated`, animationName);
|
||||
node.removeEventListener('animationend', handleAnimationEnd);
|
||||
|
||||
resolve('Animation ended');
|
||||
}
|
||||
|
||||
node.addEventListener('animationend', handleAnimationEnd);
|
||||
});
|
||||
```
|
||||
|
||||
And use it like this:
|
||||
|
||||
```javascript
|
||||
animateCSS('.my-element', 'animate__bounce');
|
||||
|
||||
// or
|
||||
animateCSS('.my-element', 'animate__bounce').then((message) => {
|
||||
// Do something after the animation
|
||||
});
|
||||
```
|
||||
|
||||
If you had a hard time understanding the previous function, have a look at [const](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const), [classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList), [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), and [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
|
47
docsSource/sections/06-migration.md
Normal file
47
docsSource/sections/06-migration.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
## Migration from v3.x and under
|
||||
|
||||
Animate.css v4 brought some improvements, improved animations, and new animations, which makes it worth upgrading. But it also comes with a breaking change: we have added prefix for all of the Animate.css classes - defaulting to `animate__` - so a direct migration is not possible.
|
||||
|
||||
But fear not! Although the default build, `animate.min.css`, brings the `animate__` prefix we also provide the `animate.compat.css` file which brings no prefix at all, like the previous versions (3.x and under).
|
||||
|
||||
If you're using a bundler, just update your import:
|
||||
|
||||
from:
|
||||
|
||||
```js
|
||||
import 'animate.min.css';
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```js
|
||||
import 'animate.compat.css';
|
||||
```
|
||||
|
||||
Notice that depending on your project's configuration, this might change a bit.
|
||||
|
||||
In case of using a CDN, just update the link on your HTML:
|
||||
|
||||
from:
|
||||
|
||||
```html
|
||||
<head>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
|
||||
/>
|
||||
</head>
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```html
|
||||
<head>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css"
|
||||
/>
|
||||
</head>
|
||||
```
|
||||
|
||||
In the case of a new project, it's highly recommended to use the default prefixed version as it'll make sure that you'll hardly have classes conflicting with your project. Besides, in later versions, we might decide to discontinue the `animate.compat.css` file.
|
53
docsSource/sections/07-custom-builds.md
Normal file
53
docsSource/sections/07-custom-builds.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
## Custom Builds
|
||||
|
||||
Animate.css is powered by npm, postcss + postcss-preset-env, which means you can create custom builds pretty easily, using future CSS today.
|
||||
|
||||
First of all, you’ll need Node and all other dependencies:
|
||||
|
||||
```shell
|
||||
$ cd path/to/animate.css/
|
||||
$ npm install
|
||||
```
|
||||
|
||||
Next, run `npm start` to compile your custom build. Three files will be generated:
|
||||
|
||||
- `animate.css`: raw build, easy to read and without any optimization
|
||||
- `animate.min.css`: minified build ready for production
|
||||
- `animate.compat.css`: minified build ready for production **without class prefix**. This should only be used as an easy path for migrations.
|
||||
|
||||
For example, if you'll only use some of the “attention seekers” animations, simply edit the `./source/animate.css` file, delete every `@import` and the ones you want to use.
|
||||
|
||||
```css
|
||||
@import 'attention_seekers/bounce.css';
|
||||
@import 'attention_seekers/flash.css';
|
||||
@import 'attention_seekers/pulse.css';
|
||||
@import 'attention_seekers/rubberBand.css';
|
||||
@import 'attention_seekers/shake.css';
|
||||
@import 'attention_seekers/headShake.css';
|
||||
@import 'attention_seekers/swing.css';
|
||||
@import 'attention_seekers/tada.css';
|
||||
@import 'attention_seekers/wobble.css';
|
||||
@import 'attention_seekers/jello.css';
|
||||
@import 'attention_seekers/heartBeat.css';
|
||||
```
|
||||
|
||||
Now, just run `npm start` and your highly optimized build will be generated at the root of the project.
|
||||
|
||||
### Changing the default prefix
|
||||
|
||||
It's pretty straight forward to change animate's prefix on your custom build. Change the `animateConfig`'s `prefix` property in the `package.json` file and rebuild the library with `npm start`:
|
||||
|
||||
```json
|
||||
/* on Animate.css package.json */
|
||||
"animateConfig": {
|
||||
"prefix": "myCustomPrefix__"
|
||||
},
|
||||
```
|
||||
|
||||
then:
|
||||
|
||||
```shell
|
||||
$ npm start
|
||||
```
|
||||
|
||||
Easy peasy!
|
15
docsSource/sections/08-contributing.md
Normal file
15
docsSource/sections/08-contributing.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
## Accessibility
|
||||
|
||||
Animate.css supports the [`prefers-reduced-motion` media query](https://webkit.org/blog/7551/responsive-design-for-motion/) so that users with motion sensitivity can opt-out of animations. On supported platforms (currently all the major browsers and OS, including mobile), users can select "reduce motion" on their operating system preferences and it will turn off CSS transitions for them without any further work required.
|
||||
|
||||
## License
|
||||
|
||||
Animate.css is licensed under the MIT license. (https://opensource.org/licenses/MIT)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project and everyone participating in it are governed by the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [callmeelton@gmail.com](mailto:callmeelton@gmail.com).
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests are the way to go here. We only have two rules for submitting a pull request: match the naming convention (camelCase, categorized [fades, bounces, etc]) and let us see a demo of submitted animations in a [pen](https://codepen.io). That **last one is important**.
|
6
docsSource/sections/09-contributors.md
Normal file
6
docsSource/sections/09-contributors.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
## Core team
|
||||
|
||||
| ![](https://avatars2.githubusercontent.com/u/439365?s=460&u=512b4cc5324938ae40bbb8f3b7769d335953cd3a&v=4) | ![](https://avatars2.githubusercontent.com/u/5007208?s=460&u=418401ee605824272e5dcb955fd64ea24546a857&v=4) | ![](https://avatars1.githubusercontent.com/u/15052701?s=460&u=9e58364978379536d3f26c4ce5cae1a2a449a0e4&v=4) |
|
||||
| --- | --- | --- |
|
||||
| [Daniel Eden](https://github.com/daneden) | [Elton Mesquita](https://github.com/eltonmesquita) | [Waren Gonzaga](https://github.com/WarenGonzaga) |
|
||||
| Animate.css creator | Maintainer | Core contributor |
|
133
docsSource/template.html
Normal file
133
docsSource/template.html
Normal file
|
@ -0,0 +1,133 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Animate.css</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints."
|
||||
/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,400;0,700;1,400&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism-tomorrow.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
|
||||
<link rel="stylesheet" href="animate.min.css" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<article class="intro">
|
||||
<section class="callout">
|
||||
<h1 class="callout-title">Animate.css</h1>
|
||||
<h2 class="callout-subtitle">Just-add-water CSS animations</h2>
|
||||
<p class="callout-showList">
|
||||
<button class="button button-animations">See animations</button>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="animation-list">
|
||||
<button class="callout-hideList button">Close list</button>
|
||||
{{list}}
|
||||
</section>
|
||||
|
||||
<footer class="intro-footer">
|
||||
<p>
|
||||
Another thing from
|
||||
<a href="Daniel Eden" target="_blank" title="Daniel Eden">Daniel Eden</a> and
|
||||
<a href="#contributors" title="Contributors">friends</a>
|
||||
</p>
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
<main>
|
||||
<header class="docs-header">
|
||||
<div class="container">
|
||||
<h2 class="docs-mainTitle">
|
||||
<a href="#documentation" title="Documentation">Documentation</a>
|
||||
</h2>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<article class="docs" id="documentation">
|
||||
<span class="hamburger">
|
||||
<svg
|
||||
width="23"
|
||||
height="15"
|
||||
viewBox="0 0 23 15"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<line y1="1.5" x2="23" y2="1.5" stroke="#351C75" stroke-width="3" />
|
||||
<line y1="7.5" x2="23" y2="7.5" stroke="#351C75" stroke-width="3" />
|
||||
<line y1="13.5" x2="23" y2="13.5" stroke="#351C75" stroke-width="3" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
{{docs}}
|
||||
</div>
|
||||
<aside class="sidebar">
|
||||
<div class="meta">
|
||||
<a href="https://github.com/daneden/animate.css" target="_blank" class="icon-github">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 18 18"
|
||||
width="18"
|
||||
height="18"
|
||||
>
|
||||
<path
|
||||
fill="#000000"
|
||||
d="M16.793 4.703a8.96 8.96 0 00-3.276-3.276A8.803 8.803 0 009 .22a8.804 8.804 0 00-4.518 1.207 8.96 8.96 0 00-3.275 3.276A8.803 8.803 0 000 9.22c0 1.96.572 3.724 1.717 5.29 1.144 1.567 2.623 2.651 4.435 3.252.211.04.367.012.469-.081a.458.458 0 00.152-.352l-.006-.633c-.004-.398-.006-.746-.006-1.042l-.27.046a3.434 3.434 0 01-.65.041 4.958 4.958 0 01-.814-.082 1.82 1.82 0 01-.785-.351 1.487 1.487 0 01-.516-.72l-.117-.27a2.93 2.93 0 00-.369-.598c-.168-.219-.338-.367-.51-.445l-.082-.059a.865.865 0 01-.152-.14.643.643 0 01-.105-.165c-.024-.054-.004-.1.058-.135.063-.035.176-.052.34-.052l.234.035c.157.031.35.125.58.281.23.156.42.36.569.61.18.32.396.564.65.732.254.168.51.252.768.252.257 0 .48-.02.667-.059a2.33 2.33 0 00.528-.175c.07-.524.262-.927.574-1.208a8.026 8.026 0 01-1.201-.21 4.779 4.779 0 01-1.102-.458 3.153 3.153 0 01-.943-.785c-.25-.312-.455-.723-.615-1.23-.16-.508-.24-1.094-.24-1.758 0-.946.308-1.75.925-2.414-.289-.711-.261-1.508.082-2.39.227-.071.563-.018 1.008.157.446.176.772.327.979.452.207.125.373.23.498.316A8.32 8.32 0 019 4.568c.773 0 1.523.101 2.25.304l.445-.281c.305-.188.664-.36 1.078-.516.414-.156.73-.199.95-.129.351.883.382 1.68.093 2.39.617.665.926 1.47.926 2.415 0 .664-.08 1.252-.24 1.764-.16.511-.367.921-.62 1.23-.255.309-.572.569-.95.78-.38.21-.747.362-1.102.456a8.013 8.013 0 01-1.201.212c.406.351.61.906.61 1.664v2.472c0 .14.048.258.146.351.097.094.252.121.463.082 1.812-.601 3.29-1.685 4.435-3.252C17.427 12.944 18 11.18 18 9.22a8.81 8.81 0 00-1.207-4.517z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<span class="animate-version">v{{version}}</span>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer class="main-footer">
|
||||
<p>
|
||||
Animate.css is a MIT licensed library.
|
||||
You can use it freely, respecting the terms included in the <a href="https://github.com/daneden/animate.css/blob/master/LICENSE" title="license">license file.
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<aside class="motionless__banner">
|
||||
<p class="motionless__paragraph">
|
||||
<b>Hey!</b> It seems that you have animations disabled on your OS, turning Animate.css
|
||||
off.<br />
|
||||
Animate.css supports the
|
||||
<a
|
||||
title="prefers-reduced-motion CSS media feature on MDN"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion"
|
||||
>
|
||||
prefers-reduced-motion CSS media feature</a
|
||||
>. You can read more about it
|
||||
<a
|
||||
title="Move Ya! Or maybe, don't, if the user prefers-reduced-motion! on Google Developers"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://developers.google.com/web/updates/2019/03/prefers-reduced-motion"
|
||||
>
|
||||
here</a
|
||||
>.
|
||||
</p>
|
||||
</aside>
|
||||
<script type="module" src="main.mjs"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||||
</body>
|
||||
</html>
|
107
gulpfile.js
107
gulpfile.js
|
@ -1,107 +0,0 @@
|
|||
// Utilities
|
||||
var autoprefixer = require('autoprefixer');
|
||||
var cssnano = require('cssnano');
|
||||
var fs = require('fs');
|
||||
|
||||
// Gulp
|
||||
var gulp = require('gulp');
|
||||
|
||||
// Gulp plugins
|
||||
var concat = require('gulp-concat');
|
||||
var gutil = require('gulp-util');
|
||||
var header = require('gulp-header');
|
||||
var postcss = require('gulp-postcss');
|
||||
var rename = require('gulp-rename');
|
||||
var runSequence = require('run-sequence');
|
||||
|
||||
// Misc/global vars
|
||||
var pkg = JSON.parse(fs.readFileSync('package.json'));
|
||||
var activatedAnimations = activateAnimations();
|
||||
|
||||
// Task options
|
||||
var opts = {
|
||||
destPath: './',
|
||||
concatName: 'animate.css',
|
||||
|
||||
autoprefixer: {
|
||||
browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
||||
cascade: false,
|
||||
},
|
||||
|
||||
minRename: {
|
||||
suffix: '.min',
|
||||
},
|
||||
|
||||
banner: [
|
||||
'@charset "UTF-8";\n',
|
||||
'/*!',
|
||||
' * <%= name %> -<%= homepage %>',
|
||||
' * Version - <%= version %>',
|
||||
' * Licensed under the MIT license - https://opensource.org/licenses/MIT',
|
||||
' *',
|
||||
' * Copyright (c) <%= new Date().getFullYear() %> <%= author.name %>',
|
||||
' */\n\n',
|
||||
].join('\n'),
|
||||
};
|
||||
|
||||
// ----------------------------
|
||||
// Gulp task definitions
|
||||
// ----------------------------
|
||||
|
||||
gulp.task('createCSS', function() {
|
||||
return gulp
|
||||
.src(activatedAnimations)
|
||||
.pipe(concat(opts.concatName))
|
||||
.pipe(postcss([autoprefixer(opts.autoprefixer)]))
|
||||
.pipe(gulp.dest(opts.destPath))
|
||||
.pipe(postcss([cssnano({reduceIdents: {keyframes: false}})]))
|
||||
.pipe(rename(opts.minRename))
|
||||
.pipe(gulp.dest(opts.destPath));
|
||||
});
|
||||
|
||||
gulp.task('addHeader', function() {
|
||||
return gulp
|
||||
.src('*.css')
|
||||
.pipe(header(opts.banner, pkg))
|
||||
.pipe(gulp.dest(opts.destPath));
|
||||
});
|
||||
|
||||
gulp.task('default', gulp.series('createCSS', 'addHeader'));
|
||||
|
||||
// ----------------------------
|
||||
// Helpers/functions
|
||||
// ----------------------------
|
||||
|
||||
// Read the config file and return an array of the animations to be activated
|
||||
function activateAnimations() {
|
||||
var categories = JSON.parse(fs.readFileSync('animate-config.json')),
|
||||
category,
|
||||
files,
|
||||
file,
|
||||
target = [],
|
||||
count = 0;
|
||||
|
||||
for (category in categories) {
|
||||
if (categories.hasOwnProperty(category)) {
|
||||
files = categories[category];
|
||||
|
||||
for (file in files) {
|
||||
if (files[file]) {
|
||||
// marked as true
|
||||
target.push('source/' + category + '/' + file + '.css');
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// prepend base CSS
|
||||
target.push('source/_base.css');
|
||||
|
||||
if (!count) {
|
||||
gutil.log('No animations activated.');
|
||||
} else {
|
||||
gutil.log(count + (count > 1 ? ' animations' : ' animation') + ' activated.');
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
67
package.json
67
package.json
|
@ -11,6 +11,25 @@
|
|||
},
|
||||
"homepage": "https://daneden.github.io/animate.css/",
|
||||
"license": "MIT",
|
||||
"animateConfig": {
|
||||
"prefix": "animate__"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm-run-all raw prod compat",
|
||||
"compat": "npx postcss source/animate.css -o animate.compat.css --no-map --env compat",
|
||||
"dev": "npx postcss source/animate.css -o animate.css --no-map --env development -w",
|
||||
"raw": "npx postcss source/animate.css -o animate.css --no-map --env development",
|
||||
"prod": "npx postcss source/animate.css -o animate.min.css --no-map --env production",
|
||||
"format": "prettier --write \"**/*.{js,json,md,css}\"",
|
||||
"precommit": "lint-staged",
|
||||
"docs:library": "npx postcss source/animate.css -o ./docs/animate.min.css --no-map --env production",
|
||||
"docs:pages": "node ./docsSource/index.js",
|
||||
"docs": "npm-run-all docs:library docs:pages"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 3%",
|
||||
"last 2 versions"
|
||||
],
|
||||
"style": "./animate.css",
|
||||
"jspm": {
|
||||
"main": "animate.css!",
|
||||
|
@ -20,39 +39,29 @@
|
|||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^9.0.1",
|
||||
"cssnano": "^4.0.3",
|
||||
"eslint": "^5.2.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-header": "^2.0.1",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-util": "^3.0.8",
|
||||
"husky": "^1.2.0",
|
||||
"lint-staged": "^8.1.0",
|
||||
"prettier": "^1.10.2",
|
||||
"run-sequence": "^2.2.1"
|
||||
"autoprefixer": "^9.7.6",
|
||||
"cssnano": "^4.1.10",
|
||||
"eslint": "^6.8.0",
|
||||
"husky": "^4.2.5",
|
||||
"lint-staged": "^10.1.6",
|
||||
"markdown-it": "^10.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^7.0.27",
|
||||
"postcss-cli": "^7.1.0",
|
||||
"postcss-header": "^2.0.0",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-prefixer": "^2.1.2",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"prettier": "^2.0.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json,md,css}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"bracketSpacing": false,
|
||||
"proseWrap": "never",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
},
|
||||
"scripts": {
|
||||
"gulp": "./node_modules/gulp/bin/gulp.js",
|
||||
"start": "gulp",
|
||||
"prettier": "prettier --write \"**/*.{js,json,md,css}\"",
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"spm": {
|
||||
"main": "./animate.css"
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm-run-all start precommit"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
47
postcss.config.js
Normal file
47
postcss.config.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
const fs = require('fs');
|
||||
const {homepage, version, author, animateConfig} = JSON.parse(fs.readFileSync('package.json'));
|
||||
|
||||
const header = `
|
||||
@charset "UTF-8";
|
||||
|
||||
/*!
|
||||
* animate.css - ${homepage}
|
||||
* Version - ${version}
|
||||
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
||||
*
|
||||
* Copyright (c) ${new Date().getFullYear()} ${author.name}
|
||||
*/
|
||||
|
||||
|
||||
`;
|
||||
|
||||
module.exports = (ctx) => {
|
||||
const prefix = ctx.env === 'compat' ? '' : animateConfig.prefix;
|
||||
const devMessage = `🎉🎉🎉🎉 \nanimate.css ${ctx.env} build was compiled sucessfully! \n`;
|
||||
|
||||
console.log(devMessage);
|
||||
|
||||
return {
|
||||
map: ctx.options.map,
|
||||
parser: ctx.options.parser,
|
||||
plugins: {
|
||||
'postcss-import': {root: ctx.file.dirname},
|
||||
'postcss-prefixer': {
|
||||
prefix,
|
||||
ignore: [/\[class\*=.*\]/],
|
||||
},
|
||||
'postcss-preset-env': {
|
||||
autoprefixer: {
|
||||
cascade: false,
|
||||
},
|
||||
features: {
|
||||
'custom-properties': true,
|
||||
},
|
||||
},
|
||||
cssnano: ctx.env === 'production' || ctx.env === 'compat' ? {} : false,
|
||||
'postcss-header': {
|
||||
header,
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
.animated {
|
||||
animation-duration: 1s;
|
||||
animation-duration: var(--animate-duration);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
|
@ -7,46 +7,62 @@
|
|||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
.animated.repeat-1 {
|
||||
animation-iteration-count: var(--animate-repeat);
|
||||
}
|
||||
|
||||
.animated.repeat-2 {
|
||||
animation-iteration-count: calc(var(--animate-repeat) * 2);
|
||||
}
|
||||
|
||||
.animated.repeat-3 {
|
||||
animation-iteration-count: calc(var(--animate-repeat) * 3);
|
||||
}
|
||||
|
||||
.animated.delay-1s {
|
||||
animation-delay: 1s;
|
||||
animation-delay: var(--animate-delay);
|
||||
}
|
||||
|
||||
.animated.delay-2s {
|
||||
animation-delay: 2s;
|
||||
animation-delay: calc(var(--animate-delay) * 2);
|
||||
}
|
||||
|
||||
.animated.delay-3s {
|
||||
animation-delay: 3s;
|
||||
animation-delay: calc(var(--animate-delay) * 3);
|
||||
}
|
||||
|
||||
.animated.delay-4s {
|
||||
animation-delay: 4s;
|
||||
animation-delay: calc(var(--animate-delay) * 4);
|
||||
}
|
||||
|
||||
.animated.delay-5s {
|
||||
animation-delay: 5s;
|
||||
}
|
||||
|
||||
.animated.fast {
|
||||
animation-duration: 800ms;
|
||||
animation-delay: calc(var(--animate-delay) * 5);
|
||||
}
|
||||
|
||||
.animated.faster {
|
||||
animation-duration: 500ms;
|
||||
animation-duration: calc(var(--animate-duration) / 2);
|
||||
}
|
||||
|
||||
.animated.fast {
|
||||
animation-duration: calc(var(--animate-duration) * 0.8);
|
||||
}
|
||||
|
||||
.animated.slow {
|
||||
animation-duration: 2s;
|
||||
animation-duration: calc(var(--animate-duration) * 2);
|
||||
}
|
||||
|
||||
.animated.slower {
|
||||
animation-duration: 3s;
|
||||
animation-duration: calc(var(--animate-duration) * 3);
|
||||
}
|
||||
|
||||
@media (print), (prefers-reduced-motion: reduce) {
|
||||
@media print, (prefers-reduced-motion: reduce) {
|
||||
.animated {
|
||||
animation-duration: 1ms !important;
|
||||
transition-duration: 1ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
}
|
||||
|
||||
.animated[class*='Out'] {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
|
5
source/_vars.css
Normal file
5
source/_vars.css
Normal file
|
@ -0,0 +1,5 @@
|
|||
:root {
|
||||
--animate-duration: 1s;
|
||||
--animate-delay: 1s;
|
||||
--animate-repeat: 1;
|
||||
}
|
131
source/animate.css
vendored
Normal file
131
source/animate.css
vendored
Normal file
|
@ -0,0 +1,131 @@
|
|||
@import '_vars.css';
|
||||
@import '_base.css';
|
||||
|
||||
/* Attention seekers */
|
||||
@import 'attention_seekers/bounce.css';
|
||||
@import 'attention_seekers/flash.css';
|
||||
@import 'attention_seekers/pulse.css';
|
||||
@import 'attention_seekers/rubberBand.css';
|
||||
@import 'attention_seekers/shakeX.css';
|
||||
@import 'attention_seekers/shakeY.css';
|
||||
@import 'attention_seekers/headShake.css';
|
||||
@import 'attention_seekers/swing.css';
|
||||
@import 'attention_seekers/tada.css';
|
||||
@import 'attention_seekers/wobble.css';
|
||||
@import 'attention_seekers/jello.css';
|
||||
@import 'attention_seekers/heartBeat.css';
|
||||
|
||||
/* Back entrances */
|
||||
@import 'back_entrances/backInDown.css';
|
||||
@import 'back_entrances/backInLeft.css';
|
||||
@import 'back_entrances/backInRight.css';
|
||||
@import 'back_entrances/backInUp.css';
|
||||
|
||||
/* Back exists */
|
||||
@import 'back_exits/backOutDown.css';
|
||||
@import 'back_exits/backOutLeft.css';
|
||||
@import 'back_exits/backOutRight.css';
|
||||
@import 'back_exits/backOutUp.css';
|
||||
|
||||
/* Bouncing entrances */
|
||||
@import 'bouncing_entrances/bounceIn.css';
|
||||
@import 'bouncing_entrances/bounceInDown.css';
|
||||
@import 'bouncing_entrances/bounceInLeft.css';
|
||||
@import 'bouncing_entrances/bounceInRight.css';
|
||||
@import 'bouncing_entrances/bounceInUp.css';
|
||||
|
||||
/* Bouncing exits */
|
||||
@import 'bouncing_exits/bounceOut.css';
|
||||
@import 'bouncing_exits/bounceOutDown.css';
|
||||
@import 'bouncing_exits/bounceOutLeft.css';
|
||||
@import 'bouncing_exits/bounceOutRight.css';
|
||||
@import 'bouncing_exits/bounceOutUp.css';
|
||||
|
||||
/* Fading entrances */
|
||||
@import 'fading_entrances/fadeIn.css';
|
||||
@import 'fading_entrances/fadeInDown.css';
|
||||
@import 'fading_entrances/fadeInDownBig.css';
|
||||
@import 'fading_entrances/fadeInLeft.css';
|
||||
@import 'fading_entrances/fadeInLeftBig.css';
|
||||
@import 'fading_entrances/fadeInRight.css';
|
||||
@import 'fading_entrances/fadeInRightBig.css';
|
||||
@import 'fading_entrances/fadeInUp.css';
|
||||
@import 'fading_entrances/fadeInUpBig.css';
|
||||
@import 'fading_entrances/fadeInTopLeft.css';
|
||||
@import 'fading_entrances/fadeInTopRight.css';
|
||||
@import 'fading_entrances/fadeInBottomLeft.css';
|
||||
@import 'fading_entrances/fadeInBottomRight.css';
|
||||
|
||||
/* Fading exits */
|
||||
@import 'fading_exits/fadeOut.css';
|
||||
@import 'fading_exits/fadeOutDown.css';
|
||||
@import 'fading_exits/fadeOutDownBig.css';
|
||||
@import 'fading_exits/fadeOutLeft.css';
|
||||
@import 'fading_exits/fadeOutLeftBig.css';
|
||||
@import 'fading_exits/fadeOutRight.css';
|
||||
@import 'fading_exits/fadeOutRightBig.css';
|
||||
@import 'fading_exits/fadeOutUp.css';
|
||||
@import 'fading_exits/fadeOutUpBig.css';
|
||||
@import 'fading_exits/fadeOutTopLeft.css';
|
||||
@import 'fading_exits/fadeOutTopRight.css';
|
||||
@import 'fading_exits/fadeOutBottomRight.css';
|
||||
@import 'fading_exits/fadeOutBottomLeft.css';
|
||||
|
||||
/* Flippers */
|
||||
@import 'flippers/flip.css';
|
||||
@import 'flippers/flipInX.css';
|
||||
@import 'flippers/flipInY.css';
|
||||
@import 'flippers/flipOutX.css';
|
||||
@import 'flippers/flipOutY.css';
|
||||
|
||||
/* Lightspeed */
|
||||
@import 'lightspeed/lightSpeedInRight.css';
|
||||
@import 'lightspeed/lightSpeedInLeft.css';
|
||||
@import 'lightspeed/lightSpeedOutRight.css';
|
||||
@import 'lightspeed/lightSpeedOutLeft.css';
|
||||
|
||||
/* Rotating entrances */
|
||||
@import 'rotating_entrances/rotateIn.css';
|
||||
@import 'rotating_entrances/rotateInDownLeft.css';
|
||||
@import 'rotating_entrances/rotateInDownRight.css';
|
||||
@import 'rotating_entrances/rotateInUpLeft.css';
|
||||
@import 'rotating_entrances/rotateInUpRight.css';
|
||||
|
||||
/* Rotating exits */
|
||||
@import 'rotating_exits/rotateOut.css';
|
||||
@import 'rotating_exits/rotateOutDownLeft.css';
|
||||
@import 'rotating_exits/rotateOutDownRight.css';
|
||||
@import 'rotating_exits/rotateOutUpLeft.css';
|
||||
@import 'rotating_exits/rotateOutUpRight.css';
|
||||
|
||||
/* Specials */
|
||||
@import 'specials/hinge.css';
|
||||
@import 'specials/jackInTheBox.css';
|
||||
@import 'specials/rollIn.css';
|
||||
@import 'specials/rollOut.css';
|
||||
|
||||
/* Zooming entrances */
|
||||
@import 'zooming_entrances/zoomIn.css';
|
||||
@import 'zooming_entrances/zoomInDown.css';
|
||||
@import 'zooming_entrances/zoomInLeft.css';
|
||||
@import 'zooming_entrances/zoomInRight.css';
|
||||
@import 'zooming_entrances/zoomInUp.css';
|
||||
|
||||
/* Zooming exits */
|
||||
@import 'zooming_exits/zoomOut.css';
|
||||
@import 'zooming_exits/zoomOutDown.css';
|
||||
@import 'zooming_exits/zoomOutLeft.css';
|
||||
@import 'zooming_exits/zoomOutRight.css';
|
||||
@import 'zooming_exits/zoomOutUp.css';
|
||||
|
||||
/* Sliding entrances */
|
||||
@import 'sliding_entrances/slideInDown.css';
|
||||
@import 'sliding_entrances/slideInLeft.css';
|
||||
@import 'sliding_entrances/slideInRight.css';
|
||||
@import 'sliding_entrances/slideInUp.css';
|
||||
|
||||
/* Sliding exits */
|
||||
@import 'sliding_exits/slideOutDown.css';
|
||||
@import 'sliding_exits/slideOutLeft.css';
|
||||
@import 'sliding_exits/slideOutRight.css';
|
||||
@import 'sliding_exits/slideOutUp.css';
|
|
@ -2,7 +2,6 @@
|
|||
from,
|
||||
20%,
|
||||
53%,
|
||||
80%,
|
||||
to {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
transform: translate3d(0, 0, 0);
|
||||
|
@ -11,16 +10,21 @@
|
|||
40%,
|
||||
43% {
|
||||
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
||||
transform: translate3d(0, -30px, 0);
|
||||
transform: translate3d(0, -30px, 0) scaleY(1.1);
|
||||
}
|
||||
|
||||
70% {
|
||||
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
||||
transform: translate3d(0, -15px, 0);
|
||||
transform: translate3d(0, -15px, 0) scaleY(1.05);
|
||||
}
|
||||
|
||||
80% {
|
||||
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
transform: translate3d(0, 0, 0) scaleY(0.95);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate3d(0, -4px, 0);
|
||||
transform: translate3d(0, -4px, 0) scaleY(1.02);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
|
||||
.heartBeat {
|
||||
animation-name: heartBeat;
|
||||
animation-duration: 1.3s;
|
||||
animation-duration: calc(var(--animate-duration) * 1.3);
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
|
|
@ -16,4 +16,5 @@
|
|||
|
||||
.pulse {
|
||||
animation-name: pulse;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
|
25
source/attention_seekers/shakeX.css
Normal file
25
source/attention_seekers/shakeX.css
Normal file
|
@ -0,0 +1,25 @@
|
|||
@keyframes shakeX {
|
||||
from,
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
10%,
|
||||
30%,
|
||||
50%,
|
||||
70%,
|
||||
90% {
|
||||
transform: translate3d(-10px, 0, 0);
|
||||
}
|
||||
|
||||
20%,
|
||||
40%,
|
||||
60%,
|
||||
80% {
|
||||
transform: translate3d(10px, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.shakeX {
|
||||
animation-name: shakeX;
|
||||
}
|
25
source/attention_seekers/shakeY.css
Normal file
25
source/attention_seekers/shakeY.css
Normal file
|
@ -0,0 +1,25 @@
|
|||
@keyframes shakeY {
|
||||
from,
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
10%,
|
||||
30%,
|
||||
50%,
|
||||
70%,
|
||||
90% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
|
||||
20%,
|
||||
40%,
|
||||
60%,
|
||||
80% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.shakeY {
|
||||
animation-name: shakeY;
|
||||
}
|
20
source/back_entrances/backInDown.css
Normal file
20
source/back_entrances/backInDown.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backInDown {
|
||||
0% {
|
||||
transform: translateY(-1200px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateY(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.backInDown {
|
||||
animation-name: backInDown;
|
||||
}
|
20
source/back_entrances/backInLeft.css
Normal file
20
source/back_entrances/backInLeft.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backInLeft {
|
||||
0% {
|
||||
transform: translateX(-2000px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateX(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.backInLeft {
|
||||
animation-name: backInLeft;
|
||||
}
|
20
source/back_entrances/backInRight.css
Normal file
20
source/back_entrances/backInRight.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backInRight {
|
||||
0% {
|
||||
transform: translateX(2000px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateX(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.backInRight {
|
||||
animation-name: backInRight;
|
||||
}
|
20
source/back_entrances/backInUp.css
Normal file
20
source/back_entrances/backInUp.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backInUp {
|
||||
0% {
|
||||
transform: translateY(1200px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateY(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.backInUp {
|
||||
animation-name: backInUp;
|
||||
}
|
20
source/back_exits/backOutDown.css
Normal file
20
source/back_exits/backOutDown.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backOutDown {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translateY(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(700px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.backOutDown {
|
||||
animation-name: backOutDown;
|
||||
}
|
20
source/back_exits/backOutLeft.css
Normal file
20
source/back_exits/backOutLeft.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backOutLeft {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translateX(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(-2000px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.backOutLeft {
|
||||
animation-name: backOutLeft;
|
||||
}
|
20
source/back_exits/backOutRight.css
Normal file
20
source/back_exits/backOutRight.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backOutRight {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translateX(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(2000px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.backOutRight {
|
||||
animation-name: backOutRight;
|
||||
}
|
20
source/back_exits/backOutUp.css
Normal file
20
source/back_exits/backOutUp.css
Normal file
|
@ -0,0 +1,20 @@
|
|||
@keyframes backOutUp {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translateY(0px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(-700px) scale(0.7);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.backOutUp {
|
||||
animation-name: backOutUp;
|
||||
}
|
|
@ -37,6 +37,6 @@
|
|||
}
|
||||
|
||||
.bounceIn {
|
||||
animation-duration: 0.75s;
|
||||
animation-duration: calc(var(--animate-duration) * 0.75);
|
||||
animation-name: bounceIn;
|
||||
}
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -3000px, 0);
|
||||
transform: translate3d(0, -3000px, 0) scaleY(3);
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 25px, 0);
|
||||
transform: translate3d(0, 25px, 0) scaleY(0.9);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
transform: translate3d(0, -10px, 0) scaleY(0.95);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate3d(0, 5px, 0);
|
||||
transform: translate3d(0, 5px, 0) scaleY(0.985);
|
||||
}
|
||||
|
||||
to {
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(-3000px, 0, 0);
|
||||
transform: translate3d(-3000px, 0, 0) scaleX(3);
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(25px, 0, 0);
|
||||
transform: translate3d(25px, 0, 0) scaleX(1);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translate3d(-10px, 0, 0);
|
||||
transform: translate3d(-10px, 0, 0) scaleX(0.98);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate3d(5px, 0, 0);
|
||||
transform: translate3d(5px, 0, 0) scaleX(0.995);
|
||||
}
|
||||
|
||||
to {
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(3000px, 0, 0);
|
||||
transform: translate3d(3000px, 0, 0) scaleX(3);
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-25px, 0, 0);
|
||||
transform: translate3d(-25px, 0, 0) scaleX(1);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translate3d(10px, 0, 0);
|
||||
transform: translate3d(10px, 0, 0) scaleX(0.98);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate3d(-5px, 0, 0);
|
||||
transform: translate3d(-5px, 0, 0) scaleX(0.995);
|
||||
}
|
||||
|
||||
to {
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 3000px, 0);
|
||||
transform: translate3d(0, 3000px, 0) scaleY(5);
|
||||
}
|
||||
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
transform: translate3d(0, -20px, 0) scaleY(0.9);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
transform: translate3d(0, 10px, 0) scaleY(0.95);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate3d(0, -5px, 0);
|
||||
transform: translate3d(0, -5px, 0) scaleY(0.985);
|
||||
}
|
||||
|
||||
to {
|
||||
|
|
|
@ -16,6 +16,6 @@
|
|||
}
|
||||
|
||||
.bounceOut {
|
||||
animation-duration: 0.75s;
|
||||
animation-duration: calc(var(--animate-duration) * 0.75);
|
||||
animation-name: bounceOut;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
@keyframes bounceOutDown {
|
||||
20% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
transform: translate3d(0, 10px, 0) scaleY(0.985);
|
||||
}
|
||||
|
||||
40%,
|
||||
45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
transform: translate3d(0, -20px, 0) scaleY(0.9);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 2000px, 0);
|
||||
transform: translate3d(0, 2000px, 0) scaleY(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@keyframes bounceOutLeft {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(20px, 0, 0);
|
||||
transform: translate3d(20px, 0, 0) scaleX(0.9);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(-2000px, 0, 0);
|
||||
transform: translate3d(-2000px, 0, 0) scaleX(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@keyframes bounceOutRight {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-20px, 0, 0);
|
||||
transform: translate3d(-20px, 0, 0) scaleX(0.9);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(2000px, 0, 0);
|
||||
transform: translate3d(2000px, 0, 0) scaleX(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
@keyframes bounceOutUp {
|
||||
20% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
transform: translate3d(0, -10px, 0) scaleY(0.985);
|
||||
}
|
||||
|
||||
40%,
|
||||
45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 20px, 0);
|
||||
transform: translate3d(0, 20px, 0) scaleY(0.9);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -2000px, 0);
|
||||
transform: translate3d(0, -2000px, 0) scaleY(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
14
source/fading_entrances/fadeInBottomLeft.css
Normal file
14
source/fading_entrances/fadeInBottomLeft.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeInBottomLeft {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(-100%, 100%, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInBottomLeft {
|
||||
animation-name: fadeInBottomLeft;
|
||||
}
|
14
source/fading_entrances/fadeInBottomRight.css
Normal file
14
source/fading_entrances/fadeInBottomRight.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeInBottomRight {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(100%, 100%, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInBottomRight {
|
||||
animation-name: fadeInBottomRight;
|
||||
}
|
14
source/fading_entrances/fadeInTopLeft.css
Normal file
14
source/fading_entrances/fadeInTopLeft.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeInTopLeft {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(-100%, -100%, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInTopLeft {
|
||||
animation-name: fadeInTopLeft;
|
||||
}
|
14
source/fading_entrances/fadeInTopRight.css
Normal file
14
source/fading_entrances/fadeInTopRight.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeInTopRight {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(100%, -100%, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInTopRight {
|
||||
animation-name: fadeInTopRight;
|
||||
}
|
14
source/fading_exits/fadeOutBottomLeft.css
Normal file
14
source/fading_exits/fadeOutBottomLeft.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeOutBottomLeft {
|
||||
from {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(-100%, 100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutBottomLeft {
|
||||
animation-name: fadeOutBottomLeft;
|
||||
}
|
14
source/fading_exits/fadeOutBottomRight.css
Normal file
14
source/fading_exits/fadeOutBottomRight.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeOutBottomRight {
|
||||
from {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(100%, 100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutBottomRight {
|
||||
animation-name: fadeOutBottomRight;
|
||||
}
|
14
source/fading_exits/fadeOutTopLeft.css
Normal file
14
source/fading_exits/fadeOutTopLeft.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeOutTopLeft {
|
||||
from {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(-100%, -100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutTopLeft {
|
||||
animation-name: fadeOutTopLeft;
|
||||
}
|
14
source/fading_exits/fadeOutTopRight.css
Normal file
14
source/fading_exits/fadeOutTopRight.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
@keyframes fadeOutTopRight {
|
||||
from {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(100%, -100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutTopRight {
|
||||
animation-name: fadeOutTopRight;
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
.flipOutX {
|
||||
animation-duration: 0.75s;
|
||||
animation-duration: calc(var(--animate-duration) * 0.75);
|
||||
animation-name: flipOutX;
|
||||
backface-visibility: visible !important;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
.flipOutY {
|
||||
animation-duration: 0.75s;
|
||||
animation-duration: calc(var(--animate-duration) * 0.75);
|
||||
backface-visibility: visible !important;
|
||||
animation-name: flipOutY;
|
||||
}
|
||||
|
|
24
source/lightspeed/lightSpeedInLeft.css
Normal file
24
source/lightspeed/lightSpeedInLeft.css
Normal file
|
@ -0,0 +1,24 @@
|
|||
@keyframes lightSpeedInLeft {
|
||||
from {
|
||||
transform: translate3d(-100%, 0, 0) skewX(30deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: skewX(-20deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: skewX(5deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.lightSpeedInLeft {
|
||||
animation-name: lightSpeedInLeft;
|
||||
animation-timing-function: ease-out;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
@keyframes lightSpeedIn {
|
||||
@keyframes lightSpeedInRight {
|
||||
from {
|
||||
transform: translate3d(100%, 0, 0) skewX(-30deg);
|
||||
opacity: 0;
|
||||
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.lightSpeedIn {
|
||||
animation-name: lightSpeedIn;
|
||||
.lightSpeedInRight {
|
||||
animation-name: lightSpeedInRight;
|
||||
animation-timing-function: ease-out;
|
||||
}
|
15
source/lightspeed/lightSpeedOutLeft.css
Normal file
15
source/lightspeed/lightSpeedOutLeft.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
@keyframes lightSpeedOutLeft {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(-100%, 0, 0) skewX(-30deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.lightSpeedOutLeft {
|
||||
animation-name: lightSpeedOutLeft;
|
||||
animation-timing-function: ease-in;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
@keyframes lightSpeedOut {
|
||||
@keyframes lightSpeedOutRight {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.lightSpeedOut {
|
||||
animation-name: lightSpeedOut;
|
||||
.lightSpeedOutRight {
|
||||
animation-name: lightSpeedOutRight;
|
||||
animation-timing-function: ease-in;
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
@keyframes rotateIn {
|
||||
from {
|
||||
transform-origin: center;
|
||||
transform: rotate3d(0, 0, 1, -200deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: center;
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -14,4 +12,5 @@
|
|||
|
||||
.rotateIn {
|
||||
animation-name: rotateIn;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
@keyframes rotateInDownLeft {
|
||||
from {
|
||||
transform-origin: left bottom;
|
||||
transform: rotate3d(0, 0, 1, -45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: left bottom;
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -14,4 +12,5 @@
|
|||
|
||||
.rotateInDownLeft {
|
||||
animation-name: rotateInDownLeft;
|
||||
transform-origin: left bottom;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
@keyframes rotateInDownRight {
|
||||
from {
|
||||
transform-origin: right bottom;
|
||||
transform: rotate3d(0, 0, 1, 45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: right bottom;
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -14,4 +12,5 @@
|
|||
|
||||
.rotateInDownRight {
|
||||
animation-name: rotateInDownRight;
|
||||
transform-origin: right bottom;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
@keyframes rotateInUpLeft {
|
||||
from {
|
||||
transform-origin: left bottom;
|
||||
transform: rotate3d(0, 0, 1, 45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: left bottom;
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -14,4 +12,5 @@
|
|||
|
||||
.rotateInUpLeft {
|
||||
animation-name: rotateInUpLeft;
|
||||
transform-origin: left bottom;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
@keyframes rotateInUpRight {
|
||||
from {
|
||||
transform-origin: right bottom;
|
||||
transform: rotate3d(0, 0, 1, -90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: right bottom;
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -14,4 +12,5 @@
|
|||
|
||||
.rotateInUpRight {
|
||||
animation-name: rotateInUpRight;
|
||||
transform-origin: right bottom;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
@keyframes rotateOut {
|
||||
from {
|
||||
transform-origin: center;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: center;
|
||||
transform: rotate3d(0, 0, 1, 200deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -13,4 +11,5 @@
|
|||
|
||||
.rotateOut {
|
||||
animation-name: rotateOut;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
@keyframes rotateOutDownLeft {
|
||||
from {
|
||||
transform-origin: left bottom;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: left bottom;
|
||||
transform: rotate3d(0, 0, 1, 45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -13,4 +11,5 @@
|
|||
|
||||
.rotateOutDownLeft {
|
||||
animation-name: rotateOutDownLeft;
|
||||
transform-origin: left bottom;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
@keyframes rotateOutDownRight {
|
||||
from {
|
||||
transform-origin: right bottom;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: right bottom;
|
||||
transform: rotate3d(0, 0, 1, -45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -13,4 +11,5 @@
|
|||
|
||||
.rotateOutDownRight {
|
||||
animation-name: rotateOutDownRight;
|
||||
transform-origin: right bottom;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
@keyframes rotateOutUpLeft {
|
||||
from {
|
||||
transform-origin: left bottom;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: left bottom;
|
||||
transform: rotate3d(0, 0, 1, -45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -13,4 +11,5 @@
|
|||
|
||||
.rotateOutUpLeft {
|
||||
animation-name: rotateOutUpLeft;
|
||||
transform-origin: left bottom;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
@keyframes rotateOutUpRight {
|
||||
from {
|
||||
transform-origin: right bottom;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
transform-origin: right bottom;
|
||||
transform: rotate3d(0, 0, 1, 90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -13,4 +11,5 @@
|
|||
|
||||
.rotateOutUpRight {
|
||||
animation-name: rotateOutUpRight;
|
||||
transform-origin: right bottom;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
@keyframes hinge {
|
||||
0% {
|
||||
transform-origin: top left;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
||||
20%,
|
||||
60% {
|
||||
transform: rotate3d(0, 0, 1, 80deg);
|
||||
transform-origin: top left;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
||||
40%,
|
||||
80% {
|
||||
transform: rotate3d(0, 0, 1, 60deg);
|
||||
transform-origin: top left;
|
||||
animation-timing-function: ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -26,6 +23,7 @@
|
|||
}
|
||||
|
||||
.hinge {
|
||||
animation-duration: 2s;
|
||||
animation-duration: calc(var(--animate-duration) * 2);
|
||||
animation-name: hinge;
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
to {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
|
||||
transform-origin: center bottom;
|
||||
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.zoomOutDown {
|
||||
animation-name: zoomOutDown;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
to {
|
||||
opacity: 0;
|
||||
transform: scale(0.1) translate3d(-2000px, 0, 0);
|
||||
transform-origin: left center;
|
||||
}
|
||||
}
|
||||
|
||||
.zoomOutLeft {
|
||||
animation-name: zoomOutLeft;
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
to {
|
||||
opacity: 0;
|
||||
transform: scale(0.1) translate3d(2000px, 0, 0);
|
||||
transform-origin: right center;
|
||||
}
|
||||
}
|
||||
|
||||
.zoomOutRight {
|
||||
animation-name: zoomOutRight;
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
to {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
|
||||
transform-origin: center bottom;
|
||||
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.zoomOutUp {
|
||||
animation-name: zoomOutUp;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue