Skip to content

Commit

Permalink
adding my ghost animation (#2408)
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-ca committed Oct 31, 2023
1 parent aa80a0a commit 683f756
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
Binary file added Art/claire-ca/floating-ghost/floating-ghost.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions Art/claire-ca/floating-ghost/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Floating Ghost</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="flex">
<div class="ghost-body">
<div class="ghost-lower-body">
<div class="ghost-feet"></div>
<div class="ghost-feet"></div>
<div class="ghost-feet"></div>
</div>
</div>
</div>
</body>
</html>
87 changes: 87 additions & 0 deletions Art/claire-ca/floating-ghost/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
html,
body {
height: 100%;
}
body {
background-color: hsl(209, 23%, 23%);
overflow: hidden;
margin: 0;
}
.flex {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
height: 100vh;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.ghost-body {
width: 8.75rem;
height: 10.5rem;
background-color: hsl(0, 0%, 95%);
border-radius: 70px 70px 0 0;
-webkit-box-shadow: 0 0 20px 5px hsl(0, 0%, 95%);
box-shadow: 0 0 20px 5px hsl(0, 0%, 95%);
position: relative;
-webkit-animation: floating 3s infinite ease-in-out;
animation: floating 3s infinite ease-in-out;
}
.ghost-body::before {
content: '';
width: 1rem;
height: 1rem;
border-radius: 50%;
display: block;
background-color: hsl(0, 100%, 50%);
position: absolute;
top: 3.125rem;
left: 2.5rem;
}
.ghost-body::after {
content: '';
width: 1rem;
height: 1rem;
border-radius: 50%;
display: block;
background-color: hsl(0, 100%, 50%);
position: absolute;
top: 3.125rem;
right: 2.5rem;
}
.ghost-lower-body {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
width: 8.75rem;
position: absolute;
bottom: -1rem;
}
.ghost-feet {
background-color: hsl(0, 0%, 95%);
width: 2.9rem;
height: 2.5rem;
border-radius: 50%;
}
@-webkit-keyframes floating {
50% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
}
@keyframes floating {
50% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
}
7 changes: 7 additions & 0 deletions include.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,13 @@ let cards = [
author: 'Kifayath',
githubLink: 'https://github.com/muhd-kifayath'
},
{
artName: 'Floating Ghost',
pageLink: './Art/claire-ca/floating-ghost/index.html',
imageLink: './Art/claire-ca/floating-ghost/floating-ghost.gif',
author: 'Claire Calder',
githubLink: 'https://github.com/claire-ca'
},
{
artName: 'NewKick',
pageLink: './Art/DAYakDREAMER/index.html',
Expand Down

0 comments on commit 683f756

Please sign in to comment.