-
Notifications
You must be signed in to change notification settings - Fork 0
/
firstvscode.html
62 lines (54 loc) · 1.89 KB
/
firstvscode.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-size: 20px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: rgb(230, 44, 44);
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
}
li {
float: left;
}
li a{
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
</style>
</head>
<body>
<div class="header">
<h2>Scroll Down</h2>
<p>Scroll down to see the sticky effect.</p>
</div>
<ul>
<li><a class="active" href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<h3>Sticky Navigation Bar Example</h3>
<p>The navbar will <strong>stick</strong> to the top when you reach its scroll position.</p>
<p><strong>Note:</strong> Internet Explorer do not support sticky positioning and Safari requires a -webkit- prefix.</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore voluptatem consequuntur veritatis accusantium vero quisquam architecto porro mollitia repudiandae commodi odit, quod aut eum non. Est recusandae repellendus commodi nostrum!</p>
<p>Delectus amet rerum accusamus accusantium modi dolores et eaque neque libero. Quos veniam inventore accusamus quisquam officia incidunt, sapiente recusandae animi eos ut magni ipsa quibusdam atque excepturi officiis facere?</p>
<p>Perferendis nostrum non nobis autem id adipisci cumque sint ex. Maiores voluptate odit quas iste deserunt repellendus eius ullam reiciendis pariatur? Animi, vero quas. Porro, dolorem atque. Officiis, unde minus.</p>
<p>Quasi omnis itaque nihil et culpa quia laborum voluptates totam dignissimos, illo accusamus recusandae ad. Amet, dolorem quidem corporis commodi asperiores voluptatum ipsam, quos provident ipsa minima dolorum. Eligendi, nobis!</p>
</body>
</html>