Steps Typing Effect
CSS
Hard
3 views
Problem Description
Create a simple typing effect using steps animation (no JS).
Output Format
Print the HTML+CSS code in one block.
Constraints
Use steps() with width and overflow hidden.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
<style>
@keyframes type { from { width: 0; } to { width: 17ch; } }
.type { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; border-right: 2px solid #0b5; width: 0; animation: type 2.2s steps(17) forwards; }
</style>
</head>
<body>
<div class='type'>meetcode practice</div>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!