This repository has been archived by the owner on Feb 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
89 lines (89 loc) · 2.07 KB
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
body,
html {
font-size: 16px;
font-family: Roboto, Ubuntu, sans-serif;
margin: 0;
padding: 0;
}
.container {
justify-content: center;
align-items: center;
position: relative;
margin: 0 auto;
height: 100%;
display: flex;
width: 100%;
}
.app__header {
background: #6495ed;
position: fixed;
padding: 30px;
color: white;
height: 140px;
font-size: 4rem;
width: 100%;
left: 0;
top: 0;
}
.app__scroll {
padding-top: 140px;
overflow-y: scroll;
overflow-x: hidden;
height: 100vh;
margin: auto;
width: 100%;
}
.app__page {
height: calc(100vh - 140px);
font-size: 4rem;
background: aquamarine;
padding: 40px;
color: #fff;
}
.app__page:nth-child(2) {
background: #00ebeb;
}
.app__page:nth-child(3) {
background: #00d6d6;
}
.app__page:nth-child(4) {
background: #00c2c2;
}
.app__page:nth-child(5) {
background: #00adad;
}
.app__page:nth-child(6) {
background: #099;
}
</style>
<title>Document</title>
</head>
<body>
<div class="container">
<div class="app__scroll">
<div class="app__header">Fixed height header</div>
<div class="app__page">Page 1</div>
<div class="app__page">Page 2</div>
<div class="app__page">Page 3</div>
<div class="app__page">Page 4</div>
<div class="app__page">Page 5</div>
</div>
</div>
<script src="index.js"></script>
</body>
</html>