* { background-color: black; } a { position: relative; font-family: monospace; background-color: black; text-decoration: none; color: green; font-size: 1.5em; } .cursor { position: absolute; top: 0; bottom: 0; right: 0; width: 100%; background: black; box-sizing: border-box; -webkit-animation: typing 12s steps(13, end) infinite; animation: typing 12s steps(13, end) infinite; } @-webkit-keyframes typing { from,to { width: 100%; } 25% { width: 0; } 50% { width: 0; } 75% { width: 100%; } } @keyframes typing { from { width: 100%; } to { width: 0; } }