Skip to content

Commit

Permalink
add: waving flag animation (#2870)
Browse files Browse the repository at this point in the history
* add: waving flag animation

* add: waving flag meta

---------

Co-authored-by: Laureline Paris <32878345+LaurelineP@users.noreply.github.com>
  • Loading branch information
hoangnv170752 and LaurelineP authored Oct 31, 2024
1 parent 5ee2811 commit e423f8c
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Art/hoangnv170752-wavingflag/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vietnam Flag Waving Animation</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="flag-container">
<div class="star">&#9733;</div>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions Art/hoangnv170752-wavingflag/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubHandle": "hoangnv170752",
"artName": "wavingflag"
}

57 changes: 57 additions & 0 deletions Art/hoangnv170752-wavingflag/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body, html {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
background-color: #DA251D;
}

.flag-container {
width: 100vw;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%, transparent 75%, transparent);
background-size: 20px 20px;
animation: wave 6s ease-in-out infinite, wrinkle 2s linear infinite;
perspective: 1000px;
}

.star {
font-size: 20vw;
color: #FFCD00;
position: absolute;
}

@keyframes wave {
0%, 100% {
transform: translateZ(0) rotate(0deg);
}
25% {
transform: translateZ(-10px) rotate(1deg);
}
50% {
transform: translateZ(-20px) rotate(0deg);
}
75% {
transform: translateZ(-10px) rotate(-1deg);
}
}

@keyframes wrinkle {
0%, 100% {
background-position: 0 0;
}
50% {
background-position: 10px 10px;
}
}

0 comments on commit e423f8c

Please sign in to comment.