Anime.js: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 11: Zeile 11:
 
* create anime object  
 
* create anime object  
 
anime({});
 
anime({});
* target (CSS selector)
+
* pass configuration object
* css properties die animiert werden sollen
+
** target (CSS selector)
 +
** css properties die animiert werden sollen
 +
 
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 
anime({
 
anime({

Version vom 16. Januar 2021, 07:43 Uhr

Anime.js ist ein Animation Framework.

Links

https://animejs.com/
https://www.youtube.com/watch?v=uRDLFXxihgc - guter Einstieg
https://codepen.io/rexjbull/pen/RwRRezq Beispiel mit Scrollmagic

Quickstart

  • create anime object

anime({});

  • pass configuration object
    • target (CSS selector)
    • css properties die animiert werden sollen
anime({
  targets: '.square',
  translateX: '250px',
});

Mehr Properties

anime({
  targets: '.square',
  translateX: '250px',
  rotateZ: 360,
  scale: 2,
  loop: true,
  duration: 5000,
});