I'm having some trouble with a code snippet I wrote to create a typing effect on hover within a div. Here's the code:
.about-panel:hover p {
color: white;
font-size: 1em;
white-space: wrap;
overflow: hidden;
-webkit-animation: typing 4s steps(1000, end),
blink-caret .5s step-end infinite alternate;
}
Unfortunately, it doesn't seem to be working as expected. The text just appears all at once after 4 seconds. Here are the animation keyframes:
@-webkit-keyframes typing {
from {
width: 0;
}
}
@-webkit-keyframes blink-caret {
50% {
border-color: transparent;
}
}
Can anyone help me figure out what the issue might be and how to fix it?