Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Load Animations/Dynamic Progress Bar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<p>loading</p>
<h1 class="load-number"></h1>
<div class="bar">
<div class="color"></div>
</div>
<!-- <div class="loader"></div> -->
</div>
<script src="script.js"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions Load Animations/Dynamic Progress Bar/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
let i = 0;
function move() {
if (i == 0) {
i = 1;
let color = document.getElementsByClassName("color")[0];
let loadNumber = document.getElementsByClassName("load-number")[0];
let width = 1;
let id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
i = 0;
} else {
width++;
color.style.width = width + "%";
loadNumber.innerText = width + "%";
}
}
}
}

function execute() {
setInterval(move, 800)
}

execute()
77 changes: 77 additions & 0 deletions Load Animations/Dynamic Progress Bar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
body, html {
height: 100%;
width: 100%;
background: black;
font-family: 'Montserrat';
}

.container {
position: relative;
height: 100vh;
width: 100%;
}

.container p {
color: #51ff0d;
font-weight: 300;
position: absolute;
bottom: 50vh;
left: 42.5%;
font-size: 5vw;
}

.load-number {
color: white;
font-weight: 600;
position: absolute;
bottom: 24vh;
left: 39.5%;
font-size: 10vw;
}

.container .bar {
position: absolute;
bottom: 34.5vh;
left: 38%;
height: 3px;
width: 30%;
background-color: transparent;
border-radius: 15px;
}

.container .bar .color {
/* position: absolute; */
bottom: 40%;
left: 41.5%;
height: 2px;
background-color: #51ff0d;
border-radius: 15px;
/* animation: advance 4s infinite linear; */
}

/* @keyframes advance {
0% {
width: 0%;
}
10% {
width: 20%;
}
20% {
width: 30%;
}
30% {
width: 40%;
}
50% {
width: 60%;
}
70% {
width: 80%;
}
90% {
width: 95%;
}
100% {
width: 100%;
}
} */