-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zero to Mastery
committed
Oct 2, 2023
1 parent
13fcc5b
commit 6febea6
Showing
2 changed files
with
48 additions
and
51 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,55 @@ | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
background-color: #f0f0f07d; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
background-color: #f0f0f07d; | ||
} | ||
|
||
.moving_flag { | ||
width: 450px; | ||
height: 300px; | ||
position: relative; | ||
overflow: hidden; | ||
animation: wave 2s infinite linear; | ||
width: 450px; | ||
height: 300px; | ||
position: relative; | ||
overflow: hidden; | ||
animation: wave 2s infinite linear; | ||
} | ||
|
||
.orange, | ||
.white, | ||
.green { | ||
width: 33.33%; | ||
height: 100%; | ||
float: left; | ||
width: 33.33%; | ||
height: 100%; | ||
float: left; | ||
} | ||
|
||
.orange { | ||
background-color: #FF9933; | ||
background-color: #ff9933; | ||
} | ||
|
||
.white { | ||
background-color: white; | ||
background-color: white; | ||
} | ||
|
||
.green { | ||
background-color: #138808; | ||
background-color: #138808; | ||
} | ||
|
||
@keyframes wave { | ||
|
||
0%, | ||
100% { | ||
transform: translateX(0); | ||
} | ||
|
||
25% { | ||
transform: translateX(-30%); | ||
} | ||
|
||
50% { | ||
transform: translateX(0); | ||
} | ||
|
||
75% { | ||
transform: translateX(30%); | ||
} | ||
} | ||
0%, | ||
100% { | ||
transform: translateX(0); | ||
} | ||
|
||
25% { | ||
transform: translateX(-30%); | ||
} | ||
|
||
50% { | ||
transform: translateX(0); | ||
} | ||
|
||
75% { | ||
transform: translateX(30%); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="index.css" /> | ||
<title>Moving Flag</title> | ||
</head> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="index.css" /> | ||
<title>Moving Flag</title> | ||
</head> | ||
|
||
<body> | ||
<div class="moving_flag"> | ||
<div class="orange"></div> | ||
<div class="white"></div> | ||
<div class="green"></div> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
<body> | ||
<div class="moving_flag"> | ||
<div class="orange"></div> | ||
<div class="white"></div> | ||
<div class="green"></div> | ||
</div> | ||
</body> | ||
</html> |