Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> body { padding: 40px; background-color: #c13b17; } p { border-right: solid 5px rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; font-family: 'Source Code Pro', monospace; font-size: 28px; color: rgba(255, 255, 255, .70); } /* Animation */ p { animation: animated-text 4s linear 1s 1 normal both, animated-cursor 600ms linear infinite; } /* text animation */ @keyframes animated-text { from { width: 0; } to { width: 456px; } } /* cursor animations */ @keyframes animated-cursor { from { border-right-color: rgba(255, 255, 255, .75); } to { border-right-color: transparent; } } </style> </head> <body> <p>To be or not to be</p> </body> </html>