Una biblioteca de JavaScript para animar texto en el desplazamiento-Letterdance. js
| Autor: | nate-parrott |
|---|---|
| Views Total: | 2,238 |
| Sitio oficial: | Ir a la web |
| Actualizado: | March 21, 2016 |
| Licencia: | MIT |
Vista prévia
Descripción
Letterdance. js es una biblioteca de JavaScript que transición entre un conjunto de texto arrastrando las letras en el desplazamiento de página.
Funcionamiento
Enlace a la Letterdance. js como esta:
<script src="letterdance.js"></script>
Agregue un grupo de texto al contenedor con el formato de letra CSS.
<div class="letterdance" style="height: 100%; width: 100%"> <div><h1>What if Kanye made a song, about Kanye?</h1></div> <div><h1>Called "I Miss The Old Kanye," man that would be so Kanye</h1></div> <div><h1>That's all it was Kanye, we still love Kanye</h1></div> <div><h1>And I love you like Kanye loves Kanye</h1></div> </div>
Eso es todo. Puede anular los valores predeterminados como este:
var FRACTION_OF_SCROLL_THAT_IS_PAGE_TRANSITION = 0.2; var FIXED_TRANSITION_TIME = 0.33; var ORIGINAL_CONTENT_OPACITY = 0; var TEXT_NODE = 3; var ELEMENT_NODE = 1;





