Skip to content

Commit

Permalink
Merge pull request #62 from sinc0115/parallax-waves
Browse files Browse the repository at this point in the history
Adds Parallax Sunset #hacktoberfest
  • Loading branch information
pulkit-30 authored Oct 12, 2021
2 parents 8d6122f + 73288d3 commit 55e5a18
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 0 deletions.
Binary file added Parallax Sunset/Sunset-Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Parallax Sunset/images/sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Parallax Sunset/images/wave.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions Parallax Sunset/parallax-sunset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Scrollable sunset with animated waves.">
<meta name="keywords" content="css,parallax,sunset,waves">
<meta name="author" content="sinc0115">
<title>Parallax Waves</title>
<link rel="stylesheet" href="style.css">
</head>

<body>

<!-- CONTAINER -->
<div id="container">

<!-- SUN -->
<div id="parallax">
<div class="sun"></div>
</div>
<!-- SUN ENDS -->

<!-- WAVES -->
<div>
<img src="images/wave.svg" alt="" class="wave one">
</div>
<div>
<img src="images/wave.svg" alt="" class="wave two">
</div>
<div>
<img src="images/wave.svg" alt="" class="wave three">
</div>
<!-- WAVES END -->

</div>
<!-- CONTAINER ENDS -->

</body>
</html>
3 changes: 3 additions & 0 deletions Parallax Sunset/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Parallax Sunset

Scrollable sunset with animated waves created by sinc0115
68 changes: 68 additions & 0 deletions Parallax Sunset/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
* {
box-sizing: border-box;
}

html, body {
margin: 0;
padding: 0;
}

#container {
background-image: linear-gradient(#ff9e61, #ff7620);
width: 100vw;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
perspective: 1px;
perspective-origin: center;
}

#parallax {
position: relative;
height: 100vh;
transform-style: preserve-3d;
transform: scale(0.9);
transition: transform 250ms ease-out;
}

.sun {
background-image: url(images/sun.svg);
width: 100vw;
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}

img.wave {
width: 100vw;
display: block;
position: absolute;
top: 40vh;
}

.wave.one {
transform: translateY(1vh);
animation: animateZ 5s infinite ease-in-out;
}
.wave.two {
transform: translateY(1vh);
animation: animateZ 7s infinite ease-in-out;
}
.wave.three {
transform: translateY(1vh);
animation: animateZ 4s infinite ease-in-out;
}

@keyframes animateZ {
0% {
transform: translateY(1vh);
}
50% {
transform: translateY(10vh);
}
100% {
transform: translateY(1vh);
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
| Card Flip on Hold | https://gabrielgomeso.github.io/card_flip.html |
| Credit Cards | https://iqbalutomo.github.io/credit-cards/ |
| Loader Glowing | https://jonathanallisson.github.io/loader/ |
| Parallax Sunset | https://sinc0115.github.io/parallax-sunset/ |
| Captain America Animation | https://jonathanallisson.github.io/Captain/ |

---
Expand Down

0 comments on commit 55e5a18

Please sign in to comment.