Skip to content

Instantly share code, notes, and snippets.

@perezdans
Last active March 14, 2022 20:04
Show Gist options
  • Save perezdans/8678121a57f280a3673365feaf6165fa to your computer and use it in GitHub Desktop.
Save perezdans/8678121a57f280a3673365feaf6165fa to your computer and use it in GitHub Desktop.
Conseguir un efecto de escritura con css
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Tricks & Tips</title>
<meta charset="UTF-8" />
<style>
.typing {
height: 80vh;
display: flex;
align-items: center;
justify-content: center;
}
.typing-effect {
width: 22ch;
animation: typing 2s steps(22), effect .5s step-end infinite alternate;
white-space: nowrap;
overflow: hidden;
border-right: 3px solid;
font-family: monospace;
font-size: 2em;
}
@keyframes typing {
from {
width: 0
}
}
@keyframes effect {
50% {
border-color: transparent
}
}
</style>
</head>
<body>
<div class="typing">
<div class="typing-effect">
Typing effect for text
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment