* { 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-box-sizing: border-box; border-left: .5em solid; -webkit-animation: typing 12s steps(13, end) infinite, blinking 1s step-end infinite; animation: typing 12s steps(13, end) infinite, blinking 1s step-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; } } @-webkit-keyframes blinking { from, to { border-color: transparent; } 50% { border-color: green; } } @keyframes blinking { from, to { border-color: transparent; } 50% { border-color: green; } }