Skip to content

Commit c310187

Browse files
authored
Add files via upload
1 parent 1e0aba1 commit c310187

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Pure CSS Progress Bar Animation| Rustcode</title>
5+
<link rel="stylesheet" href="style.css">
6+
</head>
7+
8+
<body>
9+
10+
<div class="progress-bar-container">
11+
<div class="progress-bar"></div>
12+
</div>
13+
14+
</body>
15+
</html>

style.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
body{
2+
margin: 0px;
3+
background: #F9F9F9;
4+
box-sizing: border-box;
5+
}
6+
7+
.progress-bar-container{
8+
display: flex;
9+
align-items: center;
10+
justify-content: center;
11+
height: 100vh;
12+
}
13+
14+
.progress-bar{
15+
position: relative;
16+
width: 600px;
17+
height: 20px;
18+
border-radius: 20px;
19+
overflow: hidden;
20+
background: #FFF;
21+
border: 2px solid #FE4A49;
22+
}
23+
24+
.progress-bar::before{
25+
content: "";
26+
position: absolute;
27+
width: 100%;
28+
height: 100%;
29+
transform: scaleX(0);
30+
transform-origin: left center;
31+
background-color: #FE4A49;
32+
animation: 3s progress ease-out forwards;
33+
}
34+
35+
@keyframes progress {
36+
to{
37+
transform: scaleX(1);
38+
}
39+
40+
}

0 commit comments

Comments
 (0)