Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:42:44+00:00 2026-06-03T22:42:44+00:00

Is there way to animate each letter in a word separately, using only CSS

  • 0

Is there way to animate each letter in a word separately, using only CSS?

I guess it’s possible to do, using javascript/jquery, iterating over the word as an array of letters.

But here I’m looking for an easy way out..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:42:45+00:00Added an answer on June 3, 2026 at 10:42 pm

    Whether you do it with CSS or JavaScript, you (or some library) are going to have to put each letter in its own element in order to animate them individually. E.g.:

    <p>Hi there</p>
    

    …will need to become

    <p><span>H</span><span>i</span><span> </span><span>t</span><span>h</span><span>e</span><span>r</span><span>e</span></p>
    

    That leads me to think a JavaScript solution might be preferred, as otherwise your markup will be a bit…unpleasant to write.

    With JavaScript using jQuery, it’s quite easy to replace the text of an element with a bunch of spans containing that text character-by-character:

    var target = $("#target");
    target.html(target.text().replace(/./g, "<span>$&</span>"));
    

    Then you animate the spans. (Note I’m assuming here that the element in question contains only text, not text and child elements. It’s more complex if you have child elements.)

    Here’s a very basic example:

    HTML:

    <p id="target" style="margin-top: 20px">Hi there</p>
    

    JavaScript:

    jQuery(function($) {
    
      var target = $("#target");
      target.html(target.text().replace(/./g, "<span>$&</span>"));
    
      setTimeout(runAnimation, 250);
    
      function runAnimation() {
        var index, spans;
    
        index = 0;
        spans = target.children();
        doOne();
    
        function doOne() {
          var span = $(spans[index]);
          if (!$.trim(span.text())) {
            // Skip blanks
            next();
            return;
          }
    
          // Do this one
          span.css({
            position: "relative",
          }).animate({
            top: "-20"
          }, "fast").animate({
            top: "0"
          }, "fast", function() {
            span.css("position", "");
            next();
          });
        }
    
        function next() {
          ++index;
          if (index < spans.length) {
            doOne();
          }
          else {
            setTimeout(runAnimation, 500);
          }
        }
      }
    
    });
    

    Live copy | source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a built-in way in javascript to animate an object (an image for
Is there a way to animate enabling or disabling a button? I've tried the
IS there an easier way to animate the table view. All the rows in
Right now I'm using this: $('#go-to-top').each(function(){ $(this).click(function(){ $('html').animate({ scrollTop: 0 }, 'slow'); return true;
I am using animate.css and right now I have a CSS style for animated2500
I'm using jQuery's animate function to animate a series of matching elements, but I
Is there a way to have an animated loading screen for my iPhone application
is there a way to display the animated spinning wheel while the main thread
Is there a way to find out the final location of my animated object
is there way how to get name ov event from Lambda expression like with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.