-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSmoothScrolling.html
147 lines (146 loc) · 4.59 KB
/
SmoothScrolling.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<style>
* {
margin: 0;
padding: 0;
}
body {
background: grey;
color: white;
line-height: 1.8;
/* overflow: hidden; */
}
#container {
overflow-y: scroll;
scroll-behavior: smooth;
scroll-snap-type: y mandatory;
}
/* #container {
scroll-behavior: auto;
} */
nav {
background: #000;
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 60px;
}
nav > ul > li {
display: flex;
justify-content: space-evenly;
list-style-type: none;
padding-top: 15px;
text-transform: uppercase;
}
nav ul li a {
text-decoration: none;
color: white;
}
nav ul li a:hover {
color: skyblue;
}
section {
display: flex;
width: 100%;
height: 100vh;
align-items: center;
text-align: center;
justify-content: center;
background-repeat: no-repeat;
color: gold;
background-size: cover;
scroll-snap-align: center;
}
section h1 {
font-size: 4rem;
}
section p {
font-size: 1.6rem;
}
#Home {
background-image: url("http://getwallpapers.com/wallpaper/full/7/7/4/322720.jpg");
}
#Contacts {
background-image: url("https://www.pixelstalk.net/wp-content/uploads/2016/08/HD-Funny-3D-Cartoon-Wallpaper-1.jpg");
}
#Schools {
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTJzPQVn9AfmDEugExbodNZyaX2INHfP9a2KhuWyARPjzHf0zaKnQ&s");
}
#Colleges {
background-image: url("http://upload.mediatly.com/card_pictures/2f/28/b9/2f28b958-93a9-41c9-be2d-82979bd995ac.jpg");
}
#Projects {
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSyfzbmPS19n1FUpAwEiDmO-VkSOu-KpGynamOLXAq2Hw7aH1D4&s");
}
</style>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./SmoothScrolling.css" />
<title>SmoothScrlling</title>
</head>
<body>
<div class="container">
<nav>
<ul>
<li>
<a href="#Home">Home</a>
<a href="#Contacts">Contacts</a>
<a href="#Schools">Schools</a>
<a href="#Colleges">Colleges</a>
<a href="#Projects">Projects</a>
</li>
</ul>
</nav>
<section id="Home">
<h1>Welwcome to my page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis
eius quis illo ut. Veritatis voluptatibus necessitatibus eos rerum
ipsam corporis quis, neque autem commodi. Maiores qui expedita
deserunt sit fugit.
</p>
</section>
<section id="Contacts">
<h1>Welwcome to my page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis
eius quis illo ut. Veritatis voluptatibus necessitatibus eos rerum
ipsam corporis quis, neque autem commodi. Maiores qui expedita
deserunt sit fugit.
</p>
</section>
<section id="Schools">
<h1>Welwcome to my page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis
eius quis illo ut. Veritatis voluptatibus necessitatibus eos rerum
ipsam corporis quis, neque autem commodi. Maiores qui expedita
deserunt sit fugit.
</p>
</section>
<section id="Colleges">
<h1>Welwcome to my page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis
eius quis illo ut. Veritatis voluptatibus necessitatibus eos rerum
ipsam corporis quis, neque autem commodi. Maiores qui expedita
deserunt sit fugit.
</p>
</section>
<section id="Projects">
<h1>Welwcome to my page</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis
eius quis illo ut. Veritatis voluptatibus necessitatibus eos rerum
ipsam corporis quis, neque autem commodi. Maiores qui expedita
deserunt sit fugit.
</p>
</section>
</div>
</body>
</html>