Skip to content

Commit

Permalink
Hacktoberfest2024 - eyes animation (#2739)
Browse files Browse the repository at this point in the history
* rotating squares animation

* move eyes animation

* removed commented lines

---------

Co-authored-by: Laureline Paris <32878345+LaurelineP@users.noreply.github.com>
  • Loading branch information
ornitcg and LaurelineP authored Oct 14, 2024
1 parent b031d9e commit 618af39
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Art/ornitcg-blink/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!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="styles.css">
<title>Document</title>
</head>
<body>

<div class="eye">

<div class="pupil">
<div class="shine">

</div>
</div>
</div>

<div class="eye">

<div class="pupil">
<div class="shine">

</div>
</div>
</div>




</body>
</html>
4 changes: 4 additions & 0 deletions Art/ornitcg-blink/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"artName": "blink",
"githubHandle": "ornitcg"
}
78 changes: 78 additions & 0 deletions Art/ornitcg-blink/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: black;
}


.eye {
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 60px;
display: flex;
align-items: center;
justify-content: center;
height: 300px;
width: 300px;
background-color: white;
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;

}


.pupil{
display: flex;
align-items: center;
margin-top: 50px;
margin-left: 0px;
height: 150px;
width: 150px;
background-color: black;
border-radius: 50%;
position: relative;
animation: lookdirection 5s infinite;


}

.shine {
height: 50px;
width: 50px;
background-color: white;
border-radius: 50%;
position: relative;
animation: moveshine 5s infinite;
}


@keyframes lookdirection{
0% {
left: -20%;
}
50% {
left: 30%;
}
100% {
left: -20%;
}
}


@keyframes moveshine{
0% {
left: 20%;
}
50% {
left: 30%;
}
100% {
left: 0%;
}
}


0 comments on commit 618af39

Please sign in to comment.