Professional Documents
Culture Documents
css
Animación CSS de solo-agregar-agua
Instalación
Para instalar a través de Bower, simplemente haga lo siguiente:
Uso Básico
Puede generar un hash SRI de esa versión en particular y luego usarlo para
asegurar la integridad del archivo; también puede realizar solicitudes anónimas a
CDN configurando el crossoriginatributo correspondiente :
< head >
< link rel = " stylesheet "
href = " https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css "
integrity = " sha384-OHBBOqpYHNsIqQy8hL1U + 8OXf9hH6QRxi0 +
EODezv82DfnZoV7qoHAZDwMwEJvSw "
crossorigin = " anonymous " >
<! - or ->
< link rel = " stylesheet "
href = "
https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css "
integridad =" sha384-OHBBOqpYHNsIqQy8hL1U + 8OXf9hH6QRxi0 +
EODezv82DfnZoV7qoHAZDwMwEJvSw "
crossorigin = " anonymous " >
</ head >
Nombre de la clase
Ejemplo completo:
< h1 class = " bounce infinito animado " > Ejemplo </ h1 >
Uso
Para usar animate.css en su sitio web, simplemente coloque la hoja de estilos en su
documento <head>y agregue la clase animateda un elemento junto con cualquiera
de los nombres de la animación. ¡Eso es! Tienes un elemento animado CSS. ¡Súper!
< head >
< link rel = " stylesheet " href = " animate.min.css " >
</ head >
Puede hacer un montón de otras cosas con animate.css cuando lo combina con
jQuery o agrega sus propias reglas de CSS. Agregue dinámicamente animaciones
usando jQuery con facilidad:
// Ver https://github.com/daneden/animate.css/issues/644
var animationEnd = ( function ( el ) {
var animations = {
animación : ' animationend ' ,
OAnimation : ' oAnimation End ' ,
MozAnimation : ' mozAnimationEnd ' ,
WebkitAnimation : ' webkitAnimationEnd ' ,
};
Vea un video tutorial sobre cómo usar Animate.css con jQuery aquí.
$ . fn . extend ({
animateCss : function ( animationName , callback ) {
var animationEnd = ( function ( el ) {
var animations = {
animación : ' animationend ' ,
OAnimation : ' oAnimation End ' ,
MozAnimation : ' mozAnimationEnd ' ,
WebkitAnimation : ' webkitAnimationEnd ' ,
};
devuelve esto ;
},
});
Y úsalo así:
# tuElemento {
-vendor-animación-duración : 3 s ;
-vendor-animation-delay : 2 s ;
-vendor-animation-iteration-count : infinito ;
}
$ cd path / to / animate.css /
$ sudo npm install
Licencia
Animate.css está autorizado bajo la licencia de
MIT. ( http://opensource.org/licenses/MIT )
Contribuyendo
Las solicitudes de extracción son el camino a seguir aquí. Me disculpo de antemano
por la lentitud de las solicitudes y problemas de extracción. Solo tengo dos reglas
para enviar una solicitud de extracción: coincida con la convención de
nomenclatura (camelCase, categorizado [fades, rebotes, etc.]) y veamos una
demostración de las animaciones enviadas en un bolígrafo . Ese último es
importante.
Installation
To install via Bower, simply do the following:
Basic Usage
<head>
<link rel="stylesheet" href="animate.min.css">
</head>
Instead of installing you may use the remote version (hosted by CDNJS):
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
</head>
You may generate a SRI hash of that particular version and then use it to ensure
the file's integrity; also you can make anonymous requests to CDN by setting the
corresponding crossorigin attribute:
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css"
integrity="sha384-
OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"
integrity="sha384-
OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
</head>
2. Add the class animated to the element you want to animate. You may also
want to include the class infinite for an infinite loop.
Class Name
Full example:
<head>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
</head>
You can do a whole bunch of other stuff with animate.css when you combine it
with jQuery or add your own CSS rules. Dynamically add animations using jQuery
with ease:
$('#yourElement').addClass('animated bounceOutLeft');
// See https://github.com/daneden/animate.css/issues/644
var animationEnd = (function(el) {
var animations = {
animation: 'animationend',
OAnimation: 'oAnimationEnd',
MozAnimation: 'mozAnimationEnd',
WebkitAnimation: 'webkitAnimationEnd',
};
$('#yourElement').one(animationEnd, doSomething);
Note: jQuery.one() is used when you want to execute the event handler at
most once. More information here.
You can also extend jQuery to add a function that does it all for you:
$.fn.extend({
animateCss: function(animationName, callback) {
var animationEnd = (function(el) {
var animations = {
animation: 'animationend',
OAnimation: 'oAnimationEnd',
MozAnimation: 'mozAnimationEnd',
WebkitAnimation: 'webkitAnimationEnd',
};
return this;
},
});
$('#yourElement').animateCss('bounce');
or;
$('#yourElement').animateCss('bounce', function() {
// Do somthing after animation
});
You can change the duration of your animations, add a delay or change the
number of times that it plays:
#yourElement {
-vendor-animation-duration: 3s;
-vendor-animation-delay: 2s;
-vendor-animation-iteration-count: infinite;
}
Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes
(webkit, moz, etc)
Custom Builds
Animate.css is powered by gulp.js, and you can create custom builds pretty easily.
First of all, you’ll need Gulp and all other dependencies:
$ cd path/to/animate.css/
$ sudo npm install
Next, run 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.
"attention_seekers": {
"bounce": true,
"flash": false,
"pulse": false,
"shake": true,
"headShake": true,
"swing": true,
"tada": true,
"wobble": true,
"jello":true
}
License
Animate.css is licensed under the MIT license. (http://opensource.org/licenses/MIT)
Contributing
Pull requests are the way to go here. I apologise in advance for the slow action on
pull requests and issues. I only have two rules for submitting a pull request: match
the naming convention (camelCase, categorised [fades, bounces, etc]) and let us
see a demo of submitted animations in a pen. That last one is important.