The content on this website, including videos and code examples, is for educational purposes only. All demonstrations and designs are fictional and created to illustrate coding techniques. Any resemblance to existing websites or brands is purely coincidental.
The creators and administrators of this website do not claim ownership or affiliation with any existing websites or companies. Users are encouraged to use the information responsibly for learning purposes. Liability for any misuse of the content provided is not accepted.
Below is the html code for this video.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flying Origami Bird</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="sky">
<div class="bird">
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="wind"></div>
<div class="body">
<div class="head"></div>
<div class="left-wing">
<div class="left-top-wing"></div>
</div>
<div class="right-wing">
<div class="right-top-wing"></div>
</div>
<div class="left-tail"></div>
<div class="right-tail"></div>
</div>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
}
body {
display: flex;
height: 100vh;
width: 100%;
background: #d5edff;
justify-content: center;
align-items: center;
overflow: hidden;
}
.sky {
perspective: 400px;
margin-top: -60px;
filter: drop-shadow(0 150px 10px #00000040);
}
.sky div {
transform-style: preserve-3d;
}
.bird {
animation: flyingAnim 10s linear infinite;
}
@keyframes flyingAnim {
0% {
transform: rotateX(-120deg) rotateZ(0deg) rotateX(10deg);
}
100% {
transform: rotateX(-120deg) rotateZ(360deg) rotateX(10deg);
}
}
.wind {
position: absolute;
left: 50%;
height: 200px;
width: 4px;
transform: translateX(-50%);
border-radius: 1000px;
overflow: hidden;
}
.wind:nth-child(1) {
transform: translate3d(-179px, 51px, 74px) rotateY(90deg);
}
.wind:nth-child(1)::before, .wind:nth-child(2)::before, .wind:nth-child(3)::before, .wind:nth-child(4)::before, .wind:nth-child(5)::before,
.wind:nth-child(6)::before, .wind:nth-child(7)::before, .wind:nth-child(8)::before, .wind:nth-child(9)::before, .wind:nth-child(10)::before {
content: "";
position: absolute;
height: 300px;
width: 4px;
transform: translateY(-300px);
background: #043c9a1a;
border-radius: 1000px;
animation: flowingWindAnim 1.5s linear 2.5s infinite;
}
.wind:nth-child(2) {
transform: translate3d(81px, 19px, -70px) rotateY(90deg);
}
.wind:nth-child(2)::before, .wind:nth-child(4)::before, .wind:nth-child(6)::before, .wind:nth-child(8)::before, .wind:nth-child(10)::before {
background: #3858f91a;
animation: flowingWindAnim 2s linear 2.5s infinite;
}
.wind:nth-child(3) {
transform: translate3d(109px, -116px, -10px) rotateY(90deg);
}
.wind:nth-child(3)::before {
animation: flowingWindAnim 3s linear 2s infinite;
}
.wind:nth-child(4) {
transform: translate3d(-13px, 76px, 56px) rotateY(90deg);
}
.wind:nth-child(4)::before {
animation: flowingWindAnim 1.75s linear 3s infinite;
}
.wind:nth-child(5) {
transform: translate3d(-175px, -38px, -40px) rotateY(90deg);
}
.wind:nth-child(5)::before {
animation: flowingWindAnim 2.5s linear 1.5s infinite;
}
.wind:nth-child(6) {
transform: translate3d(142px, 112px, -3px) rotateY(90deg);
}
.wind:nth-child(6)::before {
animation: flowingWindAnim 2s linear 3.5s infinite;
}
.wind:nth-child(7) {
transform: translate3d(144px, 95px, 80px) rotateY(90deg);
}
.wind:nth-child(7)::before {
animation: flowingWindAnim 2s linear 4s infinite;
}
.wind:nth-child(8) {
transform: translate3d(92px, 134px, 55px) rotateY(90deg);
}
.wind:nth-child(8)::before {
animation: flowingWindAnim 1s linear 3s infinite;
}
.wind:nth-child(9) {
transform: translate3d(136px, -80px, -92px) rotateY(90deg);
}
.wind:nth-child(9)::before {
animation: flowingWindAnim 2s linear 3.5s infinite;
}
.wind:nth-child(10) {
transform: translate3d(-12px, -39px, -30px) rotateY(90deg);
}
.wind:nth-child(10)::before {
animation: flowingWindAnim 1s linear 2.5s infinite;
}
@keyframes flowingWindAnim {
0% {
transform: translateY(-300px);
}
100% {
transform: translateY(200px);
}
}
.body {
position: relative;
height: 40px;
width: 30px;
background: #48c0d3;
}
.head {
position: absolute;
top: -30px;
border-left: 15px solid transparent;
border-bottom: 30px solid #033d51;
border-right: 15px solid transparent;
transform: rotateX(-20deg);
transform-origin: 50% 100%;
}
.left-wing {
position: absolute;
left: -30px;
height: 30px;
border-bottom: 10px solid transparent;
border-right: 30px solid #ef9c9f;
transform-origin: 100% 0;
animation: leftWingAnim 1s cubic-bezier(0.35, 0.1, 0.15, 1) infinite alternate;
}
.left-top-wing {
position: absolute;
left: -30px;
border-bottom: 30px solid transparent;
border-right: 30px solid #b06ea6;
transform-origin: 100% 0;
animation: leftWingAnim 1s cubic-bezier(0.35, 0.1, 0.15, 1) infinite alternate;
}
@keyframes leftWingAnim {
0% {
transform: rotateY(-40deg);
}
100% {
transform: rotateY(40deg);
}
}
.right-wing {
position: absolute;
left: 30px;
height: 30px;
border-bottom: 10px solid transparent;
border-left: 30px solid #ef9c9f;
transform-origin: 0 0;
animation: rightWingAnim 1s cubic-bezier(0.35, 0.1, 0.15, 1) infinite alternate;
}
.right-top-wing {
position: absolute;
border-bottom: 30px solid transparent;
border-left: 30px solid #b06ea6;
transform-origin: 0 0;
animation: rightWingAnim 1s cubic-bezier(0.35, 0.1, 0.15, 1) infinite alternate;
}
@keyframes rightWingAnim {
0% {
transform: rotateY(40deg);
}
100% {
transform: rotateY(-40deg);
}
}
.left-tail {
position: absolute;
top: 40px;
transform: rotateX(-20deg);
border-top: 40px solid #48c0d3;
border-right: 30px solid transparent;
transform-origin: 50% 0;
}
.right-tail {
position: absolute;
top: 40px;
transform: rotateX(-20deg);
border-top: 40px solid #033d51;
border-left: 30px solid transparent;
transform-origin: 50% 0;
}
Thanks for visiting