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

Commitde42a01

Browse files
committed
Added project #19 - Scroll Indicator and Web page Animation
1 parent74256bc commitde42a01

File tree

10 files changed

+409
-0
lines changed

10 files changed

+409
-0
lines changed
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
:root {
2+
--nav-height:60px;
3+
}
4+
5+
*,
6+
*::before,
7+
*::after {
8+
box-sizing: border-box;
9+
}
10+
11+
html {
12+
font-family:"Poppins","Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
13+
--primary-color:#2c2c2c;
14+
--color-body:#f3f3f3;
15+
--color-text:#343434;
16+
}
17+
18+
body {
19+
margin:0;
20+
background-color:var(--color-body);
21+
line-height:2;
22+
/* border: 5px solid red; */
23+
}
24+
25+
/* global */
26+
a {
27+
text-decoration: none;
28+
}
29+
30+
p,
31+
h1 {
32+
color:var(--color-text);
33+
}
34+
35+
ul {
36+
margin:0;
37+
padding:0;
38+
list-style-type: none;
39+
}
40+
41+
.wrapper {
42+
/* clamp(min, prefered, max) */
43+
width:clamp(320px,95%,1200px);
44+
margin:0 auto;
45+
}
46+
47+
.btn {
48+
padding:0.5rem1rem;
49+
outline: none;
50+
border: none;
51+
}
52+
53+
/* navbar */
54+
header {
55+
position: fixed;
56+
top:0;
57+
width:100%;
58+
height:var(--nav-height);
59+
background-color:var(--primary-color);
60+
z-index:100;
61+
}
62+
63+
.header-wrapper {
64+
display: flex;
65+
justify-content: space-between;
66+
align-items: center;
67+
height:100%;
68+
}
69+
70+
nav {
71+
display: flex;
72+
align-items: center;
73+
}
74+
75+
.logo {
76+
font-size:1.5rem;
77+
font-weight:500;
78+
color:#f3f3f3;
79+
}
80+
81+
.navbar {
82+
display: flex;
83+
}
84+
85+
.navbar__link {
86+
color:#f3f3f3;
87+
padding:01rem;
88+
}
89+
90+
/* hero */
91+
.hero {
92+
display: flex;
93+
justify-content: center;
94+
align-items: center;
95+
height:calc(100vh-var(--nav-height));
96+
margin-top:60px;
97+
}
98+
99+
.hero .intro {
100+
flex:1;
101+
}
102+
.hero .introh1 {
103+
font-size:4.5rem;
104+
font-weight:600;
105+
margin:0.5rem0;
106+
}
107+
.btn-cta {
108+
padding:1rem2rem;
109+
font-size:1.5rem;
110+
background-color:var(--primary-color);
111+
color:#f3f3f3;
112+
border-radius:3rem;
113+
margin-top:2rem;
114+
}
115+
116+
.btn-cta:hover {
117+
box-shadow:0006pxvar(--btn-cta-shadow);
118+
}
119+
120+
.btn-cta:active {
121+
transform:scale(0.98);
122+
}
123+
124+
.hero .image {
125+
flex:1;
126+
display: flex;
127+
justify-content: flex-end;
128+
}
129+
130+
.hero .imageimg {
131+
height:600px;
132+
width:400px;
133+
}
134+
135+
@media screenand (max-width:768px) {
136+
.header-wrapper {
137+
padding:01rem;
138+
}
139+
140+
.hero {
141+
flex-direction: column-reverse;
142+
text-align: center;
143+
}
144+
145+
.hero .image {
146+
display: flex;
147+
align-items: center;
148+
}
149+
150+
.hero .intro {
151+
padding:1rem2rem;
152+
}
153+
154+
.hero .introh1 {
155+
font-size:3rem;
156+
}
157+
158+
.hero .imageimg {
159+
height:30vh;
160+
}
161+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* global */
2+
img {
3+
width:100%;
4+
border-radius:0.5rem;
5+
}
6+
7+
h1 {
8+
font-size:4rem;
9+
margin:0.5rem0;
10+
}
11+
12+
/* sections */
13+
section {
14+
height:80vh;
15+
display: flex;
16+
align-items: center;
17+
}
18+
19+
section:nth-child(even) {
20+
flex-direction: row-reverse;
21+
}
22+
23+
.intro,
24+
.img {
25+
flex:1;
26+
}
27+
28+
.intro {
29+
padding:2rem;
30+
}
31+
32+
/* scroll indicator */
33+
#scroll-indicator {
34+
position: fixed;
35+
top:60px;
36+
height:10px;
37+
width:0%;
38+
background-color: blue;
39+
z-index:100;
40+
}
41+
42+
footer {
43+
padding:4rem;
44+
background-color:#343434;
45+
color:#f3f3f3;
46+
font-size:2rem;
47+
text-align: center;
48+
}
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="UTF-8"/>
5+
<metaname="viewport"content="width=device-width, initial-scale=1.0"/>
6+
<link
7+
rel="stylesheet"
8+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
9+
integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA=="
10+
crossorigin="anonymous"
11+
/>
12+
<linkrel="stylesheet"href="./css/startup_styles.css"/>
13+
<linkrel="stylesheet"href="./css/style.css"/>
14+
<title>Landing Page</title>
15+
</head>
16+
<body>
17+
<header>
18+
<divclass="wrapper header-wrapper">
19+
<nav>
20+
<ahref="#"class="logo">LOGO</a>
21+
<ulclass="navbar">
22+
<li><ahref="#"class="navbar__link">Products</a></li>
23+
<li><ahref="#"class="navbar__link">Iphone 12</a></li>
24+
</ul>
25+
</nav>
26+
</div>
27+
</header>
28+
<divid="scroll-indicator"></div>
29+
<main>
30+
<divclass="wrapper">
31+
<sectionclass="hero">
32+
<divclass="intro">
33+
<h1>Iphone 12</h1>
34+
<p>
35+
<ahref="https://youtu.be/lmcXjFY8dFc">Tutorial Link</a> Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores
36+
voluptas voluptates tenetur ad officiis ea corporis quos
37+
voluptatibus vitae illo corrupti quas, libero eaque sint soluta,
38+
eos natus, similique asperiores.
39+
</p>
40+
<buttonclass="btn btn-cta">
41+
<iclass="fas fa-shopping-cart"></i> Add To Cart
42+
</button>
43+
</div>
44+
<divclass="image">
45+
<imgsrc="./imgs/iphone.png"alt=""/>
46+
</div>
47+
</section>
48+
<sectionclass="about">
49+
<divclass="intro">
50+
<h1>About</h1>
51+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat illum sit voluptatem voluptatibus sequi at amet explicabo quam. Aut reiciendis obcaecati enim ut sed magni unde quae quam ipsum ratione?</p>
52+
</div>
53+
<divclass="img">
54+
<imgsrc="./imgs/pic1.jpg"alt="">
55+
</div>
56+
</section>
57+
<sectionclass="services">
58+
<divclass="intro">
59+
<h1>Services</h1>
60+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat illum sit voluptatem voluptatibus sequi at amet explicabo quam. Aut reiciendis obcaecati enim ut sed magni unde quae quam ipsum ratione?</p>
61+
</div>
62+
<divclass="img">
63+
<imgsrc="./imgs/pic2.jpg"alt="">
64+
</div>
65+
</section>
66+
<sectionclass="portfolio">
67+
<divclass="intro">
68+
<h1>portfolio</h1>
69+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat illum sit voluptatem voluptatibus sequi at amet explicabo quam. Aut reiciendis obcaecati enim ut sed magni unde quae quam ipsum ratione?</p>
70+
</div>
71+
<divclass="img">
72+
<imgsrc="./imgs/pic3.jpg"alt="">
73+
</div>
74+
</section>
75+
<sectionclass="projects">
76+
<divclass="intro">
77+
<h1>Projects</h1>
78+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat illum sit voluptatem voluptatibus sequi at amet explicabo quam. Aut reiciendis obcaecati enim ut sed magni unde quae quam ipsum ratione?</p>
79+
</div>
80+
<divclass="img">
81+
<imgsrc="./imgs/pic4.jpg"alt="">
82+
</div>
83+
</section>
84+
<sectionclass="Clients">
85+
<divclass="intro">
86+
<h1>Clients</h1>
87+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat illum sit voluptatem voluptatibus sequi at amet explicabo quam. Aut reiciendis obcaecati enim ut sed magni unde quae quam ipsum ratione?</p>
88+
</div>
89+
<divclass="img">
90+
<imgsrc="./imgs/pic5.jpg"alt="">
91+
</div>
92+
</section>
93+
</main>
94+
95+
<footer>
96+
Copyright &copy;2021
97+
</footer>
98+
<scriptsrc="https://unpkg.com/scrollreveal"></script>
99+
<scriptsrc="script.js"></script>
100+
</body>
101+
</html>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp