-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6318dc4
commit cadd4bc
Showing
13 changed files
with
225 additions
and
225 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,108 +1,108 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
:root { | ||
--index: calc(1vw + 1vh); | ||
--transition: 1.5s cubic-bezier(.05, .5, 0, 1); | ||
} | ||
@font-face { | ||
font-family: kamerik-3d; | ||
src: url(../fonts/kamerik205-heavy.woff2); | ||
font-weight: 900; | ||
} | ||
@font-face { | ||
font-family: merriweather-italic-3d; | ||
src: url(../fonts/merriweather-regular-italic.woff2); | ||
} | ||
body { | ||
background-color: #000; | ||
color: #fff; | ||
font-family: kamerik-3d; | ||
} | ||
.logo { | ||
--logo-size: calc(var(--index) * 7.8); | ||
width: var(--logo-size); | ||
height: var(--logo-size); | ||
background-repeat: no-repeat; | ||
position: absolute; | ||
left: calc(51% - calc(var(--logo-size) / 2)); | ||
top: calc(var(--index) * 2.8); | ||
z-index: 1; | ||
} | ||
.layers { | ||
perspective: 1000px; | ||
overflow: hidden; | ||
} | ||
.layers__container { | ||
height: 100vh; | ||
min-height: 500px; | ||
transform-style: preserve-3d; | ||
transform: rotateX(var(--move-y)) rotateY(var(--move-x)); | ||
will-change: transform; | ||
transition: transform var(--transition); | ||
} | ||
.layers__item { | ||
position: absolute; | ||
inset: -5vw; | ||
background-size: cover; | ||
background-position: center; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.layer-1 { | ||
transform: translateZ(-55px) scale(1.06); | ||
} | ||
.layer-2 { | ||
transform: translateZ(80px) scale(.88); | ||
} | ||
.layer-3 { | ||
transform: translateZ(180px) scale(.8); | ||
} | ||
.layer-4 { | ||
transform: translateZ(190px) scale(.9); | ||
} | ||
.layer-5 { | ||
transform: translateZ(300px) scale(.9); | ||
} | ||
.layer-6 { | ||
transform: translateZ(380px); | ||
} | ||
.hero-content { | ||
font-size: calc(var(--index) * 2.9); | ||
text-align: center; | ||
text-transform: uppercase; | ||
letter-spacing: calc(var(--index) * -.15); | ||
line-height: 1.35em; | ||
margin-top: calc(var(--index) * 5.5); | ||
} | ||
.hero-content span { | ||
display: block; | ||
} | ||
.hero-content__p { | ||
text-transform: none; | ||
font-family: merriweather-italic-3d; | ||
letter-spacing: normal; | ||
font-size: calc(var(--index) * .73); | ||
line-height: 3; | ||
} | ||
.button-start { | ||
font-family: Arial; | ||
font-weight: 600; | ||
text-transform: uppercase; | ||
font-size: calc(var(--index) * .71); | ||
letter-spacing: -.02vw; | ||
padding: calc(var(--index) * .7) calc(var(--index) * 1.25); | ||
background-color: transparent; | ||
color: #fff; | ||
border-radius: 10em; | ||
border: rgb(255 255 255 / .4) 3px solid; | ||
outline: none; | ||
cursor: pointer; | ||
margin-top: calc(var(--index) * 2.5); | ||
} | ||
.layer-4, .layer-5, .layer-6 { | ||
pointer-events: none; | ||
} | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
:root { | ||
--index: calc(1vw + 1vh); | ||
--transition: 1.5s cubic-bezier(.05, .5, 0, 1); | ||
} | ||
@font-face { | ||
font-family: kamerik-3d; | ||
src: url(../fonts/kamerik205-heavy.woff2); | ||
font-weight: 900; | ||
} | ||
@font-face { | ||
font-family: merriweather-italic-3d; | ||
src: url(../fonts/merriweather-regular-italic.woff2); | ||
} | ||
body { | ||
background-color: #000; | ||
color: #fff; | ||
font-family: kamerik-3d; | ||
} | ||
.logo { | ||
--logo-size: calc(var(--index) * 7.8); | ||
width: var(--logo-size); | ||
height: var(--logo-size); | ||
background-repeat: no-repeat; | ||
position: absolute; | ||
left: calc(51% - calc(var(--logo-size) / 2)); | ||
top: calc(var(--index) * 2.8); | ||
z-index: 1; | ||
} | ||
.layers { | ||
perspective: 1000px; | ||
overflow: hidden; | ||
} | ||
.layers__container { | ||
height: 100vh; | ||
min-height: 500px; | ||
transform-style: preserve-3d; | ||
transform: rotateX(var(--move-y)) rotateY(var(--move-x)); | ||
will-change: transform; | ||
transition: transform var(--transition); | ||
} | ||
.layers__item { | ||
position: absolute; | ||
inset: -5vw; | ||
background-size: cover; | ||
background-position: center; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.layer-1 { | ||
transform: translateZ(-55px) scale(1.06); | ||
} | ||
.layer-2 { | ||
transform: translateZ(80px) scale(.88); | ||
} | ||
.layer-3 { | ||
transform: translateZ(180px) scale(.8); | ||
} | ||
.layer-4 { | ||
transform: translateZ(190px) scale(.9); | ||
} | ||
.layer-5 { | ||
transform: translateZ(300px) scale(.9); | ||
} | ||
.layer-6 { | ||
transform: translateZ(380px); | ||
} | ||
.hero-content { | ||
font-size: calc(var(--index) * 2.9); | ||
text-align: center; | ||
text-transform: uppercase; | ||
letter-spacing: calc(var(--index) * -.15); | ||
line-height: 1.35em; | ||
margin-top: calc(var(--index) * 5.5); | ||
} | ||
.hero-content span { | ||
display: block; | ||
} | ||
.hero-content__p { | ||
text-transform: none; | ||
font-family: merriweather-italic-3d; | ||
letter-spacing: normal; | ||
font-size: calc(var(--index) * .73); | ||
line-height: 3; | ||
} | ||
.button-start { | ||
font-family: Arial; | ||
font-weight: 600; | ||
text-transform: uppercase; | ||
font-size: calc(var(--index) * .71); | ||
letter-spacing: -.02vw; | ||
padding: calc(var(--index) * .7) calc(var(--index) * 1.25); | ||
background-color: transparent; | ||
color: #fff; | ||
border-radius: 10em; | ||
border: rgb(255 255 255 / .4) 3px solid; | ||
outline: none; | ||
cursor: pointer; | ||
margin-top: calc(var(--index) * 2.5); | ||
} | ||
.layer-4, .layer-5, .layer-6 { | ||
pointer-events: none; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>paralax-3d</title> | ||
<link rel="stylesheet" href="css/main.css" /> | ||
<script src="js/app.js" defer></script> | ||
<script src="libs/rain.js" defer></script> | ||
</head> | ||
<body> | ||
<div class="logo" style="background-image: url(img/logo.svg)"></div> | ||
<section class="layers"> | ||
<div class="layers__container"> | ||
<div | ||
class="layers__item layer-1" | ||
style="background-image: url(img/layer-1.jpg)" | ||
></div> | ||
<div | ||
class="layers__item layer-2" | ||
style="background-image: url(img/layer-2.png)" | ||
></div> | ||
<div class="layers__item layer-3"> | ||
<div class="hero-content"> | ||
<h1>Natural Forest <span>HTML / CSS</span></h1> | ||
<div class="hero-content-p"> | ||
Creating a beautiful 3Dwebsite with a 'lens effect' | ||
</div> | ||
<button class="button-start">Start learning</button> | ||
</div> | ||
</div> | ||
<div class="layers__item layer-4"> | ||
<canvas class="rain"></canvas> | ||
</div> | ||
<div | ||
class="layers__item layer-5" | ||
style="background-image: url(img/layer-5.png)" | ||
></div> | ||
<div | ||
class="layers__item layer-6" | ||
style="background-image: url(img/layer-6.png)" | ||
></div> | ||
</div> | ||
</section> | ||
<div style="height: 100vh"></div> | ||
</body> | ||
</html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>paralax-3d</title> | ||
<link rel="stylesheet" href="css/main.css" /> | ||
<script src="js/app.js" defer></script> | ||
<script src="libs/rain.js" defer></script> | ||
</head> | ||
<body> | ||
<div class="logo" style="background-image: url(img/logo.svg)"></div> | ||
<section class="layers"> | ||
<div class="layers__container"> | ||
<div | ||
class="layers__item layer-1" | ||
style="background-image: url(img/layer-1.jpg)" | ||
></div> | ||
<div | ||
class="layers__item layer-2" | ||
style="background-image: url(img/layer-2.png)" | ||
></div> | ||
<div class="layers__item layer-3"> | ||
<div class="hero-content"> | ||
<h1>Natural Forest <span>HTML / CSS</span></h1> | ||
<div class="hero-content-p"> | ||
Creating a beautiful 3Dwebsite with a 'lens effect' | ||
</div> | ||
<button class="button-start">Start learning</button> | ||
</div> | ||
</div> | ||
<div class="layers__item layer-4"> | ||
<canvas class="rain"></canvas> | ||
</div> | ||
<div | ||
class="layers__item layer-5" | ||
style="background-image: url(img/layer-5.png)" | ||
></div> | ||
<div | ||
class="layers__item layer-6" | ||
style="background-image: url(img/layer-6.png)" | ||
></div> | ||
</div> | ||
</section> | ||
<div style="height: 100vh"></div> | ||
</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,8 @@ | ||
document.addEventListener("mousemove", (e) => { | ||
Object.assign(document.documentElement, { | ||
style: ` | ||
--move-x:${e.clientX}; | ||
--move-y:${e.clientY}; | ||
`, | ||
}); | ||
}); |
Oops, something went wrong.