Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • CSS Tutorial
  • CSS Exercises
  • CSS Interview Questions
  • CSS Selectors
  • CSS Properties
  • CSS Functions
  • CSS Examples
  • CSS Cheat Sheet
  • CSS Templates
  • CSS Frameworks
  • Bootstrap
  • Tailwind
  • CSS Formatter
Open In App
Next Article:
Snowfall Animation Effect using CSS
Next article icon

Loading Text Animation Effect using CSS

Last Updated : 24 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

There are a lot of animations possible in CSS and today we will look at the loading text animation. The basic idea behind the working of this animation is the application of animation delay. Every alphabet is delayed by .1s so that each alphabet animates with a little delay and give the loading animation.

HTML Code:

It is used to create the basic structure of the text loading animation. We will use <span> tag to display all alphabets in a linear fashion. The <span> tags are enclosed by <div> tag.

HTML
<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8" />     <meta name="viewport" content=         "width=device-width, initial-scale=1.0" />              <title>Loading Text Animation using CSS</title> </head>  <body>     <div class="geeks">         <span>G</span>         <span>E</span>         <span>E</span>         <span>K</span>         <span>S</span>         <span>F</span>         <span>O</span>         <span>R</span>         <span>G</span>         <span>E</span>         <span>E</span>         <span>K</span>         <span>S</span>     </div> </body>  </html> 

CSS Code:

The CSS property is used to apply animation effect. First, we apply animation to all the alphabets and then add some delay. The duration of delay can be adjusted according to the need. You can adjust the animation duration and keyframes to make the animation a little faster or slower.

CSS
<style>     .geeks {         height: 40px;         position: absolute;         top: 50%;         left: 50%;         transform: translateX(-50%) translateY(-50%);     }      .geeks span {         font-family: -apple-system, BlinkMacSystemFont,             "Segoe UI", Roboto,Oxygen, Ubuntu, Cantarell,             "Open Sans", "Helvetica Neue", sans-serif;         font-size: 24px;         color: green;         display: inline-block;         transition: all 0.5s;         animation: animate 2s infinite;     }     .geeks span:nth-child(1) {         animation-delay: 0.1s;     }     .geeks span:nth-child(2) {         animation-delay: 0.2s;     }     .geeks span:nth-child(3) {         animation-delay: 0.3s;     }     .geeks span:nth-child(4) {         animation-delay: 0.4s;     }     .geeks span:nth-child(5) {         animation-delay: 0.5s;     }     .geeks span:nth-child(6) {         animation-delay: 0.6s;     }     .geeks span:nth-child(7) {         animation-delay: 0.7s;     }     .geeks span:nth-child(8) {         animation-delay: 0.8s;     }     .geeks span:nth-child(9) {         animation-delay: 0.9s;     }     .geeks span:nth-child(10) {         animation-delay: 1s;     }     .geeks span:nth-child(11) {         animation-delay: 1.1s;     }     .geeks span:nth-child(12) {         animation-delay: 1.2s;     }     .geeks span:nth-child(13) {         animation-delay: 1.3s;     }      @keyframes animate {         0% {             color: green;             transform: translateY(0);             margin-left: 0;         }         25% {             color: green;             transform: translateY(-15px);             margin-left: 10px;         }         100% {             color: green;             transform: translateY(0);             margin-left: 0;         }     }     </style> 

Complete Code:

In this section, we will combine both HTML and CSS code to design a Loading Text Animation effect using HTML and CSS.

html
<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8" />     <meta name="viewport" content=         "width=device-width, initial-scale=1.0" />              <title>Loading Text Animation using CSS</title>          <style>         .geeks {             height: 40px;             position: absolute;             top: 50%;             left: 50%;             transform: translateX(-50%) translateY(-50%);         }              .geeks span {             font-family: -apple-system, BlinkMacSystemFont,                 "Segoe UI", Roboto,Oxygen, Ubuntu, Cantarell,                 "Open Sans", "Helvetica Neue", sans-serif;             font-size: 24px;             color: green;             display: inline-block;             transition: all 0.5s;             animation: animate 2s infinite;         }         .geeks span:nth-child(1) {             animation-delay: 0.1s;         }         .geeks span:nth-child(2) {             animation-delay: 0.2s;         }         .geeks span:nth-child(3) {             animation-delay: 0.3s;         }         .geeks span:nth-child(4) {             animation-delay: 0.4s;         }         .geeks span:nth-child(5) {             animation-delay: 0.5s;         }         .geeks span:nth-child(6) {             animation-delay: 0.6s;         }         .geeks span:nth-child(7) {             animation-delay: 0.7s;         }         .geeks span:nth-child(8) {             animation-delay: 0.8s;         }         .geeks span:nth-child(9) {             animation-delay: 0.9s;         }         .geeks span:nth-child(10) {             animation-delay: 1s;         }         .geeks span:nth-child(11) {             animation-delay: 1.1s;         }         .geeks span:nth-child(12) {             animation-delay: 1.2s;         }         .geeks span:nth-child(13) {             animation-delay: 1.3s;         }              @keyframes animate {             0% {                 color: green;                 transform: translateY(0);                 margin-left: 0;             }             25% {                 color: green;                 transform: translateY(-15px);                 margin-left: 10px;             }             100% {                 color: green;                 transform: translateY(0);                 margin-left: 0;             }         }         </style> </head>  <body>     <div class="geeks">         <span>G</span>         <span>E</span>         <span>E</span>         <span>K</span>         <span>S</span>         <span>F</span>         <span>O</span>         <span>R</span>         <span>G</span>         <span>E</span>         <span>E</span>         <span>K</span>         <span>S</span>     </div> </body>  </html> 

Output:

https://media.geeksforgeeks.org/wp-content/uploads/20240723203421/text.mp4


Next Article
Snowfall Animation Effect using CSS

S

sirohimukul1999
Improve
Article Tags :
  • CSS
  • Web Technologies
  • CSS-Questions

Similar Reads

  • Fading Text Animation Effect Using CSS3
    The fading text animation effect is one of the most demanding effects on UI/UX designing. This effect can be achieved by using HTML5 and CSS3. In the fading text effect, whenever we load the window, the text will slowly start disappearing. We can implement this effect using the animation property in
    2 min read
  • Text switching animation using CSS
    Text Switching animation is an essential part of modern web engagement concepts. There are many types of Text Switching animation, depending on your imagination as well. Here in this tutorial, we will be learning to transition the words with a blur effect. The words come from the front blurring out
    4 min read
  • Snowfall Animation Effect using CSS
    In this article, we will see how to create a snowfall animation using HTML and CSS purely, without Javascript & related libraries. In this animation, the user will see the screen covered with a background image, & small snowballs are falling down the screen. As they are falling, they fade aw
    5 min read
  • How to Create Circle Loading Animation Effect using CSS ?
    In this article, we will see how to create a circle-loading animation using HTML and CSS, along with understanding its basic implementation through the example. Generally, Loading Animation is utilized to wait for the content to be fully loaded on the webpage. If some pages don't contain the loader,
    6 min read
  • How to Create Jumping Text 3D Animation Effect using CSS ?
    In this article, you will learn to implement Jumping Texts animation effect using simple HTML and CSS. HTML is used to create the structure of the page and CSS is used to set the styling. HTML Code: In this section, we will design the basic structure of the body. [GFGTABS] html <!DOCTYPE html>
    4 min read
  • How to Create Page Loading Animation Effect using jQuery?
    In this article, we are going to learn how to create page loading animation effect (Please Wait, Loading... animation) using jQuery, A "Please Wait, Loading..." animation is a visual indication shown during data retrieval or processing, assuring users that content is being fetched or actions are in
    6 min read
  • How to Create Loading Blur Text Animation Effect using HTML and CSS?
    The blur text animation is known as the Smoky effect and is used to give the text a blurry animation. The text blurs linearly in one direction and then reappears. In this article, we will create a loading blur text animation effect using HTML and CSS. Approach: The approach to create loading blur te
    3 min read
  • Create Effect of Particle Animation using CSS
    At least once, you must have seen a website with particles appearing and disappearing in its background. This cool particle animation may seem complicated but it is actually quite easy to make. In this article, we will set an image as the background of our body, and on it, we will have particles mov
    6 min read
  • Pulsing Heart Animation Effect Using HTML & CSS
    This article will teach you about widely fascinated and used HTML & CSS animation i.e. Pulsating Heart Animation. In this article, basically we will learn two methods to implement the animation. This animation is beneficial while making footer of the most website with some common text like Made
    7 min read
  • How to create Shooting Star Animation Effect using CSS ?
    The Shooting Star effect is one of the coolest background effects that is used for dark-themed websites. Shooting Stars Animation is an extraordinary illustration of a loading screen that grabs your eye for a considerable length of time for the remainder of the content to load on the website. This e
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences