File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments