I try to animate some text with html and css. For the moment, I've this :
<div id="rectangle"></div>
<p>Hello world</p>
body {
margin:0
}
#rectangle{
position: absolue;
width:100%;
height:100px;
background:#1D2024;
}
p {
margin-top: -60px;
margin-left: 30%;
border-right: solid 3px rgba(87, 203, 204,.75);
white-space: nowrap;
overflow: hidden;
font-family: 'Source Code Pro', monospace;
font-size: 28px;
color: #57CBCC;
}
/* Animation */
p {
animation: animated-text 4s steps(29,end) 1s 1 normal both,
animated-cursor 600ms steps(29,end) infinite;
}
/* text animation */
@keyframes animated-text{
from{width: 0;}
to{width: 472px;}
}
/* cursor animations */
@keyframes animated-cursor{
from{border-right-color: rgba(87, 203, 204,.75);}
to{border-right-color: transparent;}
}
The codepen is here : https://codepen.io/aakhya/pen/EOxqOV
Why the cursor is stopping so far away after the " d " ? Someone could show me how to stopped the cursor just after the d ?
Thanks a lot