Created
March 28, 2024 17:32
-
-
Save darcien/7c054a4b0addc2fa8f1ae7bee3a9693f to your computer and use it in GitHub Desktop.
Indeterminate progress indicator a la Windows XP boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bar { | |
background-color: white; | |
width: 200px; | |
padding: 4px; | |
border-radius: 4px; | |
border: 2px solid; | |
overflow: hidden; | |
height: 20px; | |
} | |
.bar > .indicator { | |
animation-duration: 2s; | |
animation-name: loop; | |
animation-iteration-count: infinite; | |
animation-timing-function: linear; | |
} | |
@keyframes loop { | |
from { | |
transform: translate(-100%); | |
} | |
to { | |
transform: translate(100%); | |
} | |
} | |
body { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
box-sizing: border-box; | |
padding: 50px; | |
background: radial-gradient(hsl(30, 80%, 80%), hsl(210, 50%, 70%)) no-repeat | |
center; | |
} | |
html, | |
body { | |
height: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="bar"> | |
<div class="indicator"> | |
👾👾👾 | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment