How to Create Text Animation Effects Using AnimeJS

Hello friends, today we will be going to How to Create Text Animation Effects Using  Anime.js. I have posted many videos and articles before related to the JavaScript project, now this the something new that we are going to build.


What do you mean by Anime.js?
anime.js is a lightweight JavaScript liveliness library that permits you to make complex activitys with a solitary, incredible API. It works with pretty much anything online: CSS properties, SVG, DOM credits and JavaScript Objects. 

anime.js makes it simple to make layered and complex livelinesss, and gives you full control of timing and setting off occasions so they move precisely how and when you need them. It upholds probably the most recent programs, and offers a lot of models and exhibitions to make you energize right away. Vivify all that you need just and effectively with anime.js.

Video Tutorial of How to Create Text Animation Effects Using  Anime.js


As you have seen on the given video tutorial of  How to Create Text Animation Effects Using  Anime.js, 

If you are feeling bored watching the given video tutorial of How to Create Text Animation Effects Using  Anime.js then you can copy or download the given codes below:


How to Create Text Animation Effects Using  Anime.js | Free Source Code

To create this program (Text Animation Effect). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file.

In the first place, download anime.js and make a HTML document with the name of index.html and glue the given codes in your HTML record. Keep in mind, you've to make a document with .html extension.
<!DOCTYPE html>
  <!-- Created By S-Tech04 -->
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="style.css">
  <title>Text Animation</title>
</head>
<body>
  <section>
    <h2 class="text">AnimeJs Text Animation Effects</h2>
  </section>

  <script src="./anime.min.js"></script>
  <script src="./app.js"></script>
</body>
</html>
  
Second, make a CSS record with the name of style.css and glue the given codes in your CSS document. Keep in mind, you've to make a record with .css extension.
*
{
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: sans-serif;
}
section
{
   display: flex;
   justify-content: center;
   align-items: center;
   min-height: 100vh;
   width: 100%;
   overflow: hidden;
   background: #0e1623;
}
section .text
{
   color: #4db2ec;
   font-size: 5em;
   position: relative;
   text-align: center;
   -webkit-box-reflect: below -0.45em linear-gradient(transparent, #0004);
}
section .text span
{
   position: relative;
   display: inline-block;
}
  
Last, create a JavaScript file with the name of app.js and paste the given codes in your JavaScript file. Remember, you’ve to create a file with .js extension.
const text = document.querySelector('.text')
text.innerHTML = text.textContent.replace(/\S/g,"<span>$&</span>")

var textAnime = anime.timeline({
   targets: '.text span',
   easing: 'easeOutExpo',
   loop: true,
   delay: anime.stagger(100),
   duration: 1500 , // 1.5 seconds
})

textAnime.add({
   translateY: [-600,0], //[start value, end Value]
   scale: [10, 1],
   opacity: [0, 1]
}).add({
   translateX: [0,-1000], //[start value, end Value]
   scale: [1, 15],
   opacity: [1, 0]
}).add({
   translateX: [1000, 0], //[start value, end Value]
   scale: [15, 1],
   opacity: [0, 1]
}).add({
   translateX: [0, 0], //[start value, end Value]
   scale: [1, 50],
   opacity: [1, 0]
})
  

That’s all, now you’ve successfully created a program to text Animation using html css & JavaScript. If your code doesn’t work or you’ve faced any error/problem, please download the source code files from the given download button. It’s free and a .zip file will be downloaded then you’ve to extract it.
Click on the following download button to download all source code files.



Download Now
Please Wait...
Direct Link click here.

How can I help you

Post a Comment

How can I help you

Post a Comment (0)

Previous Post Next Post