Skip to content

Instantly share code, notes, and snippets.

@danqulogy
Created July 7, 2023 09:33
Show Gist options
  • Select an option

  • Save danqulogy/edc6ea5a7a9b107c6e2a8019d938d0f3 to your computer and use it in GitHub Desktop.

Select an option

Save danqulogy/edc6ea5a7a9b107c6e2a8019d938d0f3 to your computer and use it in GitHub Desktop.
Simple Loading Visualization
<!DOCTYPE html>
<html data-theme="cupcake" lang="en">
<head>
<meta charset="utf-8" />
<title>BusPro</title>
<base href="/" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
</head>
<body>
<div class="root">
<style type="text/css">
.preloader {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
transition: opacity 0.65s;
}
.preloader-hidden-add {
display: block;
opacity: 1;
}
.preloader-hidden-add-active {
opacity: 0;
}
.preloader-hidden {
display: none;
}
.cs-loader {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.cs-loader-inner {
position: absolute;
top: 50%;
width: 100%;
color: #3d3d3d;
text-align: center;
transform: translateY(-50%);
}
.cs-loader-inner label {
display: inline-block;
font-size: 20px;
opacity: 0;
}
@keyframes lol {
0% {
transform: translateX(-300px);
opacity: 0;
}
33% {
transform: translateX(0);
opacity: 1;
}
66% {
transform: translateX(0);
opacity: 1;
}
100% {
transform: translateX(300px);
opacity: 0;
}
}
.cs-loader-inner label:nth-child(6) {
animation: lol 3s infinite ease-in-out;
}
.cs-loader-inner label:nth-child(5) {
animation: lol 3s 0.1s infinite ease-in-out;
}
.cs-loader-inner label:nth-child(4) {
animation: lol 3s 0.2s infinite ease-in-out;
}
.cs-loader-inner label:nth-child(3) {
animation: lol 3s 0.3s infinite ease-in-out;
}
.cs-loader-inner label:nth-child(2) {
animation: lol 3s 0.4s infinite ease-in-out;
}
.cs-loader-inner label:nth-child(1) {
animation: lol 3s 0.5s infinite ease-in-out;
}
</style>
<div class="preloader">
<div class="cs-loader">
<div class="cs-loader-inner">
<label> ●</label>
<label> ●</label>
<label> ●</label>
<label> ●</label>
<label> ●</label>
<label> ●</label>
</div>
</div>
</div>
</div>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment