-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from sinc0115/parallax-waves
Adds Parallax Sunset #hacktoberfest
- Loading branch information
Showing
7 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Parallax Sunset | ||
|
||
Scrollable sunset with animated waves created by sinc0115 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters