Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reveal one letter at a time? [closed]

Tags:

html

css

When my web page loads, using CSS, I want the text "widget world" to appear across the top as if someone were writing it manually; one letter at a time would appear.

I'm going to use a cursive font. There would be a few milliseconds delay in between each letter appearing.

I thought to make each letter a separate div then fade them in one by one.

like image 763
dot Avatar asked Nov 02 '15 20:11

dot


People also ask

How do you animate a letter in a letter?

In the Animation Pane, select the arrow next to your animation, and select Effect Options. In the dialog box, on the Effect tab under Enhancements, select the arrow next to Animate text, and select By letter.

How do I make text appear one by one in HTML?

Text-reveal is a type of effect in which all the alphabets of the text are revealed one by one in some animated way.

How do I add animation to text?

You can add an animation to grouped objects, text, and more. Press Ctrl and select the objects you want. Select Format > Group > Group to group the objects together. Select Animations and choose an animation.


2 Answers

Here's a snippet for something that you are looking for.

p{
  color: Pink; 
  font-family: "Courier";
  font-size: 20px;
  margin: 10px 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  width: 30em;
  animation: type 4s steps(60, end); 
}

@keyframes type{ 
  from { width: 0; } 
} 
<p>Hi folks, this is typing animation using CSS</p>
like image 164
Sohrab Hejazi Avatar answered Sep 29 '22 06:09

Sohrab Hejazi


Maybe this way will fit you: fixed width for inline-block and animation for decrease or increase its width

div {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  animation: example 2s linear 0s infinite alternate;
}

@keyframes example {
  from {
    width: 0;
  }
  to {
    width: 150px;
  }
}
<div>some text</div>
like image 44
JAYBEkster Avatar answered Sep 29 '22 06:09

JAYBEkster