-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1827 from zero-to-mastery/christine-aqui-hacktobe…
…r2023 Christine aqui hacktober2023
- Loading branch information
Showing
4 changed files
with
134 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,108 @@ | ||
body, | ||
html { | ||
margin: 0; | ||
height: 100%; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #a0d8f1; | ||
} | ||
|
||
.dog { | ||
position: relative; | ||
width: 60px; | ||
height: 40px; | ||
animation: walk 5s linear infinite; | ||
} | ||
|
||
.body { | ||
position: absolute; | ||
width: 60px; | ||
height: 40px; | ||
background-color: brown; | ||
border-radius: 30px; | ||
} | ||
|
||
.leg { | ||
position: absolute; | ||
width: 10px; | ||
height: 40px; | ||
background-color: brown; | ||
border-radius: 5px; | ||
animation: walkLegs 0.5s linear infinite; | ||
} | ||
|
||
.front-left { | ||
top: 25px; | ||
left: 10px; | ||
animation-delay: 0.25s; | ||
} | ||
|
||
.front-right { | ||
top: 25px; | ||
left: 40px; | ||
} | ||
|
||
.back-left { | ||
top: 25px; | ||
left: 0; | ||
} | ||
|
||
.back-right { | ||
top: 25px; | ||
left: 50px; | ||
animation-delay: 0.25s; | ||
} | ||
.head { | ||
position: absolute; | ||
width: 30px; | ||
height: 30px; | ||
background-color: brown; | ||
border-radius: 50%; | ||
top: -15px; | ||
left: 50px; | ||
} | ||
|
||
.head::before, | ||
.head::after { | ||
content: ''; | ||
position: absolute; | ||
width: 20px; | ||
height: 10px; | ||
background-color: brown; | ||
border-radius: 50%; | ||
} | ||
|
||
.head::before { | ||
transform: rotate(45deg); | ||
top: -5px; | ||
left: -10px; | ||
} | ||
|
||
.head::after { | ||
transform: rotate(-45deg); | ||
top: -5px; | ||
right: -10px; | ||
} | ||
|
||
@keyframes walk { | ||
0% { | ||
transform: translateX(-100px); | ||
} | ||
100% { | ||
transform: translateX(100%); | ||
} | ||
} | ||
|
||
@keyframes walkLegs { | ||
0%, | ||
100% { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(10px); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Dog Walking Animation</title> | ||
<link rel="stylesheet" href="dog.css" /> | ||
</head> | ||
<body> | ||
<div class="dog"> | ||
<div class="body"></div> | ||
<div class="head"></div> | ||
<div class="leg front-left"></div> | ||
<div class="leg front-right"></div> | ||
<div class="leg back-left"></div> | ||
<div class="leg back-right"></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