-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Laureline Paris <[email protected]>
- Loading branch information
1 parent
56b006c
commit 95b7413
Showing
3 changed files
with
120 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Football Animation</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="pitch"> | ||
<div class="goal left"></div> | ||
<div class="goal right"></div> | ||
<div class="ball"></div> | ||
<div class="player player1"></div> | ||
<div class="player player2"></div> | ||
<div class="player player3"></div> | ||
<div class="player player4"></div> | ||
|
||
</div> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"artName": "messivsronaldo", | ||
"githubHandle": "3nn3n" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0; | ||
height: 100vh; | ||
background-color: #aad751; | ||
overflow: hidden; | ||
} | ||
|
||
.pitch { | ||
width: 90%; | ||
height: 60%; | ||
background-color: #6ab04c; | ||
border: 5px solid white; | ||
position: relative; | ||
} | ||
|
||
.goal { | ||
width: 10px; | ||
height: 100px; | ||
background-color: white; | ||
position: absolute; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} | ||
|
||
.goal.left { | ||
left: 0; | ||
} | ||
|
||
.goal.right { | ||
right: 0; | ||
} | ||
|
||
|
||
.ball { | ||
width: 20px; | ||
height: 20px; | ||
background-color: white; | ||
border: 2px solid black; | ||
border-radius: 50%; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
animation: ballMove 6s infinite ease-in-out; | ||
} | ||
|
||
.player { | ||
width: 30px; | ||
height: 30px; | ||
background-color: #3498db; | ||
border-radius: 50%; | ||
position: absolute; | ||
} | ||
|
||
.player1 { | ||
top: 40%; | ||
left: 30%; | ||
} | ||
|
||
.player2 { | ||
top: 60%; | ||
left: 70%; | ||
} | ||
|
||
.player3 { | ||
top: 40%; | ||
left: 90%; | ||
} | ||
|
||
.player4 { | ||
top: 40%; | ||
left: 50%; | ||
} | ||
|
||
@keyframes ballMove { | ||
0%, 100% { | ||
top: 50%; | ||
left: 50%; | ||
} | ||
25% { | ||
top: 40%; | ||
left: 30%; | ||
} | ||
50% { | ||
top: 60%; | ||
left: 70%; | ||
} | ||
75% { | ||
top: 50%; | ||
left: 90%; | ||
} | ||
} |