Loading Text

HTML
<h1 data-text="Loading…">Loading…</h1>
CSS
html, body { height: 100%; overflow: hidden; background: #F05D5E; font-family: sans-serif; display: flex; justify-content: center; align-items: center; } h1 { position: relative; color: rgba(0, 0, 0, .3); font-size: 5em } h1:before { content: attr(data-text); position: absolute; overflow: hidden; max-width: 7em; white-space: nowrap; color: #fff; animation: loading 6s linear infinite; } @keyframes loading { 0% { max-width: 0; } }
JAVASCRIPT
Expand for more options Login