Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7df8e59

Browse files
committed
add parallax website
1 parent368227b commit7df8e59

File tree

4 files changed

+45
-12
lines changed

4 files changed

+45
-12
lines changed

‎99-parallax website/index.html

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,9 @@ <h4>yayavar</h4>
1717
</nav>
1818
<divclass="container">
1919
<h2class="main-title">Explore.</h2>
20-
<img
21-
src="https://i.ibb.co/dK5zQgY/background.png"
22-
class="background"
23-
alt=""
24-
/>
25-
<imgsrc="https://i.ibb.co/gwtNKDz/man.png"class="man"alt=""/>
26-
<img
27-
src="https://i.ibb.co/XJrwv0M/foreground.png"
28-
class="foreground"
29-
alt=""
30-
/>
20+
<imgsrc="https://i.ibb.co/rsp6RFJ/bg1.png"class="background"alt=""/>
21+
<imgsrc="https://i.ibb.co/237VsHs/girl1.png"class="girl"alt=""/>
22+
<imgsrc="https://i.ibb.co/BKtjhV2/rock1.png"class="rock"alt=""/>
3123
</div>
3224
<divclass="content">
3325
<divclass="content-images">

‎99-parallax website/script.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
letcontroller=newScrollMagic.Controller();
2+
lettimeline=newTimelineMax();
3+
4+
timeline
5+
.to(".rock",10,{y:-300})
6+
.to(".girl",10,{y:-200},"-=10")
7+
.fromTo(".background",{y:-50},{y:0,duration:10},"-=10")
8+
.to(".content",10,{top:"0%"},"-=10")
9+
.fromTo(".content-images",{opacity:0},{opacity:1,duration:3})
10+
.fromTo(".text",{opacity:0},{opacity:1,duration:3});
11+
12+
letscene=newScrollMagic.Scene({
13+
triggerElement:"section",
14+
duration:"300%",
15+
triggerHook:0,
16+
})
17+
.setTween(timeline)
18+
.setPin("section")
19+
.addTo(controller);

‎99-parallax website/style.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,25 @@ nav {
5656
padding:2rem20rem;
5757
font-size:1.1rem;
5858
}
59+
60+
@media (max-width:768px) {
61+
nav,
62+
.text {
63+
padding:2rem;
64+
font-size:1rem;
65+
text-align: center;
66+
}
67+
68+
.main-title {
69+
font-size:3rem;
70+
}
71+
72+
.content-images {
73+
flex-direction: column;
74+
}
75+
76+
.content-imagesimg {
77+
max-width:100%;
78+
padding:2rem00.25rem;
79+
}
80+
}

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
| 96|[Cloud Hosting Service](https://github.com/solygambas/html-css-fifty-projects/tree/master/96-cloud%20hosting%20service)|[Live Demo](https://codepen.io/solygambas/full/oNBrXYr)|
105105
| 97|[Terminal Style Landing Page](https://github.com/solygambas/html-css-fifty-projects/tree/master/97-terminal%20style%20landing%20page)|[Live Demo](https://codepen.io/solygambas/full/BaWvXLG)|
106106
| 98|[Magazine Layout](https://github.com/solygambas/html-css-fifty-projects/tree/master/98-magazine%20layout)|[Live Demo](https://codepen.io/solygambas/full/OJpGMyj)|
107-
| 99|[Parallax Website](https://github.com/solygambas/html-css-fifty-projects/tree/master/99-parallax%20website)|[Live Demo](#)|
107+
| 99|[Parallax Website](https://github.com/solygambas/html-css-fifty-projects/tree/master/99-parallax%20website)|[Live Demo](https://codepen.io/solygambas/full/poeBdPr)|
108108

109109
This repository is mostly based on 2 courses by Brad Traversy (2020):
110110

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp