textanimation-js-cicelystoey
v1.0.0
Published
This is a simple JavaScript code that creates a text animation effect where the characters of a given text break apart and then come back together.
Downloads
2
Readme
Text Animation README This is a simple JavaScript code that creates a text animation effect where the characters of a given text break apart and then come back together.
Description The index.js file contains the JavaScript code responsible for generating the text animation effect. It does the following:
Creating Character Elements: The text is split into individual characters, and each character is wrapped in a element.
Applying Shatter Effect: The characters are randomly displaced and rotated to create a shatter effect, making them appear scattered.
Clearing Shatter Effect: After a short delay, the characters return to their original positions, thus clearing the shatter effect.
Usage To use this code, you need to include the index.js file in your HTML document and have an empty container element with an id of text-container where the animated text will be displayed.