-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
161 lines (141 loc) · 4.37 KB
/
test.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html>
<head>
<title>Kevin Kuo</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Hi! My name is Kevin Kuo, a CS major at The Pennsylvania State University, University Park.">
<meta name="keywords" content="Kevin Kuo,PSU,penn state,Kevin,Kuo">
<meta name="author" content="Kevin Kuo">
<link rel="stylesheet" href="w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
$(window).scroll(function(){
$('.container p').each(function(){
var scrollTop = $(window).scrollTop(),
elementOffset = $(this).offset().top,
distance = (elementOffset - scrollTop),
windowHeight = $(window).height(),
breakPoint = windowHeight*0.9;
if(distance > breakPoint) {
$(this).addClass("more-padding");
} if(distance < breakPoint) {
$(this).removeClass("more-padding");
}
});
});
</script>
<style>
body {
background:#111;
font-size:18px;
color:#FFF;
}
h1 {
font-size:2em;
text-align:center;
margin:20px 0 40px;
padding:0;
}
.container {
background:#222;
width:80%;
margin:0 auto;
overflow:auto;
padding:2%;
}
.right-content, .left-content {
float:left;
display:block;
width:40%;
padding:1% 2%;
}
.left-content {
border-right:5px dotted #666;
text-align:right;
}
.left-content p {
margin:150px 0 0;
}
.right-content p {
margin:80px 0 150px;
}
.container p {
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7 ease-in-out;
-ms-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
.left-content .more-padding {
padding-right:100px;
}
.right-content .more-padding {
padding-left:100px;
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123141432-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-123141432-1');
</script>
</head>
<body>
<!-- Navbar (sit on top) -->
<div class="w3-top">
<div class="w3-bar" id="myNavbar">
<a class="w3-bar-item w3-button w3-hover-black w3-hide-medium w3-hide-large w3-right" href="javascript:void(0);" onclick="toggleFunction()" title="Toggle Navigation Menu">
<i class="fa fa-bars"></i>
</a>
<a href="#home" class="w3-bar-item w3-button">HOME</a>
<a href="#about" class="w3-bar-item w3-button w3-hide-small"><i class="fa fa-user"></i> ABOUT</a>
</div>
<!-- Navbar on small screens -->
<div id="navDemo" class="w3-bar-block w3-white w3-hide w3-hide-large w3-hide-medium">
<a href="#about" class="w3-bar-item w3-button" onclick="toggleFunction()">ABOUT</a>
</div>
</div>
<!-- Container (About Section) -->
<div class="container">
<h1>Simple Animated Timeline Scroller</h1>
<div class="left-content">
<p>Content 01</p>
<p>Content 02</p>
<p>Content 03</p>
<p>Content 04</p>
<p>Content 05</p>
<p>Content 06</p>
<p>Content 07</p>
<p>Content 08</p>
<p>Content 09</p>
<p>Content 10</p>
</div>
<div class="right-content">
<p>Content 01<br \>asdfasdfa<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf<br \>asdfasdf</p>
<p>Content 02</p>
<p>Content 03</p>
<p>Content 04</p>
<p>Content 05</p>
<p>Content 06</p>
<p>Content 07</p>
<p>Content 08</p>
<p>Content 09</p>
<p>Content 10</p>
</div>
</div>
<!-- Footer -->
<footer class="w3-center w3-black w3-padding-16 w3-opacity w3-hover-opacity-on">
<a href="#home" class="w3-button w3-light-grey"><i class="fa fa-arrow-up w3-margin-right"></i>To the top</a>
<h1><font size="+1">Kevin Kuo</font></h1>
<!--
<p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a></p>
-->
</footer>
</body>
</html>