Skip to content

Commit

Permalink
Merge pull request #68 from aj-spec/new
Browse files Browse the repository at this point in the history
Flying Bird Animation
  • Loading branch information
pulkit-30 authored Oct 18, 2021
2 parents 533184c + cb41919 commit e89a73a
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Flying Bird Animation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The flying bird CSS animation can be used for vivid and nature related websites, making the entire website engaging and vibrant
<img width="1437" alt="Screenshot 2021-10-11 at 8 30 21 PM" src="https://user-images.githubusercontent.com/68581010/136812555-e63f9b11-6770-4c90-b24b-ff0be0f10782.png">
36 changes: 36 additions & 0 deletions Flying Bird Animation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flying Bird Animation</title>
<link href="style.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">

<div class="bird-container bird-container--one">
<div class="bird bird--one"></div>
</div>

<div class="bird-container bird-container--two">
<div class="bird bird--two"></div>
</div>

<div class="bird-container bird-container--three">
<div class="bird bird--three"></div>
</div>

<div class="bird-container bird-container--four">
<div class="bird bird--four"></div>
</div>

</div>
<footer>
<div>Credit: <a href="https://github.com/aj-spec">AYUSHI JAIN</a></div>
<div>Date: 17 /10/ 2021</div>
</footer>
</body>
</html>

168 changes: 168 additions & 0 deletions Flying Bird Animation/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
@import url('https://fonts.googleapis.com/css?family=Arima+Madurai:300');

*,
*::before,
*::after {
box-sizing: border-box;
}

.container {
z-index: 1;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
min-height: 35rem;
background-image: linear-gradient(to bottom, rgba(255,168,76,0.6) 0%,rgba(255,123,13,0.6) 100%), url('https://images.unsplash.com/photo-1446824505046-e43605ffb17f');
background-blend-mode: soft-light;
background-size: cover;
background-position: center center;
padding: 2rem;
}

.bird {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/174479/bird-cells-new.svg);
background-size: auto 100%;
width: 88px;
height: 125px;
will-change: background-position;

animation-name: fly-cycle;
animation-timing-function: steps(10);
animation-iteration-count: infinite;

&--one {
animation-duration: 1s;
animation-delay: -0.5s;
}

&--two {
animation-duration: 0.9s;
animation-delay: -0.75s;
}

&--three {
animation-duration: 1.25s;
animation-delay: -0.25s;
}

&--four {
animation-duration: 1.1s;
animation-delay: -0.5s;
}

}

.bird-container {
position: absolute;
top: 20%;
left: -10%;
transform: scale(0) translateX(-10vw);
will-change: transform;

animation-name: fly-right-one;
animation-timing-function: linear;
animation-iteration-count: infinite;

&--one {
animation-duration: 15s;
animation-delay: 0;
}

&--two {
animation-duration: 16s;
animation-delay: 1s;
}

&--three {
animation-duration: 14.6s;
animation-delay: 9.5s;
}

&--four {
animation-duration: 16s;
animation-delay: 10.25s;
}

}

@keyframes fly-cycle {

100% {
background-position: -900px 0;
}

}

@keyframes fly-right-one {

0% {
transform: scale(0.3) translateX(-10vw);
}

10% {
transform: translateY(2vh) translateX(10vw) scale(0.4);
}

20% {
transform: translateY(0vh) translateX(30vw) scale(0.5);
}

30% {
transform: translateY(4vh) translateX(50vw) scale(0.6);
}

40% {
transform: translateY(2vh) translateX(70vw) scale(0.6);
}

50% {
transform: translateY(0vh) translateX(90vw) scale(0.6);
}

60% {
transform: translateY(0vh) translateX(110vw) scale(0.6);
}

100% {
transform: translateY(0vh) translateX(110vw) scale(0.6);
}

}

@keyframes fly-right-two {

0% {
transform: translateY(-2vh) translateX(-10vw) scale(0.5);
}

10% {
transform: translateY(0vh) translateX(10vw) scale(0.4);
}

20% {
transform: translateY(-4vh) translateX(30vw) scale(0.6);
}

30% {
transform: translateY(1vh) translateX(50vw) scale(0.45);
}

40% {
transform: translateY(-2.5vh) translateX(70vw) scale(0.5);
}

50% {
transform: translateY(0vh) translateX(90vw) scale(0.45);
}

51% {
transform: translateY(0vh) translateX(110vw) scale(0.45);
}

100% {
transform: translateY(0vh) translateX(110vw) scale(0.45);
}

}

0 comments on commit e89a73a

Please sign in to comment.