-
Notifications
You must be signed in to change notification settings - Fork 0
/
Benefits_And_Drawbacks.html
197 lines (150 loc) · 7.54 KB
/
Benefits_And_Drawbacks.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!Doctype html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One|Chivo&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans&display=swap" rel="stylesheet">
<title>Benefits And Drawbacks</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type = "text/css">
* {
margin: 0;
padding: 0;
}
/* We have included the header, or in this case, navbar, css down below */
/* This is the overall header div css */
#navbar {
z-index: 999;
overflow: hidden;
background-color: #555;
font-family: 'Josefin Sans', sans-serif;
}
/* Within the header div css, we have included divs for each of the links */
#navbar a {
float: left;
display: block;
color: #fff;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
font-family: 'Josefin Sans', sans-serif;
}
/* When the user hovers over one of the link divs, its colors change accordingly to below */
#navbar a:hover {
background-color: #ddd;
color: black;
font-family: 'Josefin Sans', sans-serif;
}
/* When the user actively clicks on a link div, or the user is on the link div's webpage, it turns these colors */
#navbar a.active {
background-color: #000;
color: white;
font-family: 'Josefin Sans', sans-serif;
}
/* This is the css that ensures that the header bar is always at the top of the webpage */
.sticky {
position: fixed;
top: 0;
width: 100%;
font-family: 'Josefin Sans', sans-serif;
}
/* This is some more css for the Impact specific pages css */
.Impact1 {
margin: 0;
padding-top: 40px;
position: relative;
}
.Impact2 {
margin: 0;
padding: 0px;
position: relative;
width: 100%;
height: 100%;
object-fit: contain;
}
.Impact2 img {
max-width: 100%;
}
.centered {
position: absolute;
top: 15%;
left: 50%;
transform: translate(-50%, -50%);
font: caption;
font-size: 60px;
text-align: center;
background: -webkit-linear-gradient(rgb(212, 205, 205), rgb(0, 0, 0));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-family: 'Josefin Sans', sans-serif;
}
</style>
<body>
<!--This is the html below for the header, or navbar. Have a look at the css and the html to yeet -->
<!--understand how the classes control color in the navbar and the link divs.-->
<div id = "navbar">
<a href="Home_Page.html">Home</a>
<a href="Our_Town.html">Our Town</a>
<a class="active" href="Benefits_And_Drawbacks.html">Benefits and Drawbacks</a>
<a href="Rationale.html">Rationale</a>
<a href="Driver_Surveys.html">Driver Surveys</a>
<a href="Login.html">Contact Us</a>
</div>
<div class = "Impact1">
</div>
<div class = "Impact2">
<img src = "tesla-roadster-4k-pd.jpg">
<div class = "centered">The Benefits and Drawbacks of Autonomous Vehicles</div>
</div>
<div bottom = 0px padding-top = 40px>
<img bottom = 0; padding-top = 40px float = left object-fit = contain position = relative width = 49.8% src = "Benefits of Autonomous Vehicles (1).png">
<img bottom = 0; padding-top =40px float = right object-fit = contain position = relative width = 49.8% src = "Risks (2).png">
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- Everything below is important for the scripts. Do not change this stuff please... -->
<script type="text/javascript">
(function() {
window.onload = function() {myFunction()};
var navbar = document.getElementById("navbar");
var sticky = navbar.offsetTop;
function myFunction() {
if (window.pageYOffset >= sticky) {
navbar.classList.add("sticky")
} else {
navbar.classList.remove("sticky");
}
}
setTimeout(function() {
$('.fly-in-text').removeClass('hidden');
}, 500);
var documentEl = $(document),
parallaxBg = $('div.parallax-bg');
documentEl.on('scroll', function() {
var currScrollPos = documentEl.scrollTop();
parallaxBg.css('background-position', '0 ' + -currScrollPos/4 + 'px');
});
setTimeout(function() {
$('.fly-in-texts').removeClass('hidden');
}, 500);
var documentEl = $(document),
parallaxBg = $('div.parallax-bg');
documentEl.on('scroll', function() {
var currScrollPos = documentEl.scrollTop();
parallaxBg.css('background-position', '0 ' + -currScrollPos/4 + 'px');
});
var aboutEl = $('div.fade-in'),
aboutElOffset = aboutEl.offset().top/2,
documentEl = $(document);
documentEl.on('scroll', function() {
if ( documentEl.scrollTop() > aboutElOffset && aboutEl.hasClass('hidden') ) aboutEl.removeClass('hidden');
});
var aboutEl1 = $('div.town'),
aboutElOffset1 = aboutEl1.offset().top/2,
documentEl1 = $(document);
documentEl1.on('scroll', function() {
if ( documentEl1.scrollTop() > aboutElOffset1 && aboutEl1.hasClass('hidden') ) aboutEl1.removeClass('hidden');
});
})();
</script>