-
Notifications
You must be signed in to change notification settings - Fork 0
/
2index.html
268 lines (235 loc) · 9.6 KB
/
2index.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE HTML>
<!--
Aerial by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<style>
#header ul {
list-style: none;
padding-top: 15%;
font-size: 1.05rem;
}
.input1 {
outline-style: none;
border: 1px solid hsl(198deg 57% 82%);
border-radius: 3px;
width: 620px;
font-size: 1rem;
font-weight: 400 !important;
font-family: "Microsoft soft";
background: hsl(198deg 49% 43%);
width: 5.5REM;
padding: 4px 4px;
border-width: 0.19rem;
border-radius: 15px;
margin: 0.5rem;
text-align: center;
margin-left: 0.8REM;
}
.input2{
z-index: 100;
border: 1px #EEEEEE solid;
border-radius: 0.2rem;
color: #EEEEEE;
font-size: 1.15rem;
white-space: nowrap;
cursor: pointer;
white-space: nowrap;
padding: 0.4rem 2.0rem;
cursor: pointer;
position: absolute;
top: 60%;
left: 50%;
transform: translate(-50%,+50%);
border-radius: 17px;
font-weight: 400!important;
background-color: hsl(165deg 37% 43%);
font-family: 'Source Sans Pro', sans-serif;
border: 0.2rem hsl(161deg 64% 65%) solid;
}
#aurorabanner{
background-color: hsl(148deg 67% 49% / 90%);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
margin-left: 0px;
margin-right: 0px;
width: 100%;
text-align: center;
font-size: 22px;
padding-top: 30px;
padding-bottom: 30px;
font-weight: 600;
letter-spacing: 0.1em;
font-family: 'Source Sans Pro', sans-serif;
}
label{
display: inline-block;
min-width: 100px;/*或者 width: 100px;*/
}
li{
font-size: 1.2rem;
font-family: 'Source Sans Pro', sans-serif;
font-weight: 200;
}
body{
overflow: scroll;
}
table{
margin:0 auto;
}
#processheader2 h3 {
font-size: 1rem;
font-weight: 400;
letter-spacing: 0.1em;
line-height: 1em;
position: relative;
text-align: center;
top: 5rem;
font-family: 'Source Sans Pro', sans-serif;
}
#tip{
background-color: rgb(0 0 0 / 80%);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
margin-left: 0px;
margin-right: 0px;
width: 100%;
text-align: center;
font-size: 22px;
padding-top: 30px;
padding-bottom: 30px;
font-weight: 600;
letter-spacing: 0.1em;
font-family: 'Source Sans Pro', sans-serif;
}
form{
margin: 26% auto;
position:relative
}
</style>
<title>Restart the Earth</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="js/skel.min.js"></script>
<script src="js/init.js"></script>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
// setTimeout(function(){
// // $("#aurorabanner").css("display","none");//将图片的display属性设置为none
// }
// ,1000);//设置三千毫秒即3秒
setTimeout(function(){
$("#aurorabanner").fadeOut(1500)//将图片的display属性设置为none
}
,2500);//设置三千毫秒即3秒
$(document).ready(function(){
$("#aurorabanner").click(function(){
$("#aurorabanner").hide();
});
})
function Fade(){
document.getElementById("tip").style.display="none"
}
function Fenpei(){
var agr=document.getElementsByName("agri")[0].value;
var tec=document.getElementsByName("tech")[0].value;
var ind=document.getElementsByName("indu")[0].value;
var bel=document.getElementsByName("beli")[0].value;
if ((agr*1+tec*1+ind*1+bel*1)!=20){
$("input.input2").before("<div id='tip' onclick='Fade()'>您未完全分配点数(20),请重新分配您的点数</div>")
// $("#tip").hide(3500)
return false
} else{parsein
return true
}
}
</script>
</script>
<script>
window.addEventListener('resize', function () {
if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
// 判断当前active的元素是否为input/ textarea
window.setTimeout(function () {
document.activeElement.scrollIntoViewIfNeeded()
// 原生方法,滚动至需要显示的位置
}, 0)
}
})
</script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-wide.css" />
<link rel="stylesheet" href="css/style-noscript.css" />
</noscript>
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<body class="loading">
<div id="wrapper">
<div id="bg"></div>
<div id="overlay"></div>
<!-- <div id="property">
</div> -->
<div id="main" >
<!-- Header -->
</div>
<header id="header">
<!-- <div id='tip1' onclick='Fade()'>您未完全分配点数(20),请重新分配您的点数</div> -->
<!-- <h2>Design Your Property</h2> -->
<br>
<br>
<form name="frm" method="get" action="3forever.html" onsubmit="return Fenpei()">
<!-- <ul> -->
<!-- <li>农业<input class="input1" name="agri" value="3" type="number"></li>
<li>科技<input class="input1" name="tech" value="9" type="number"></li>
<li>工业<input class="input1" name="indu" value="4" type="number"></li>
<li>信念<input class="input1" name="beli" value="4" type="number"></li> -->
<table >
<tr>
<td>农业</td>
<td><input class="input1" name="agri" value="3" type="number"></td>
<td> 科技</td>
<td><input class="input1" name="tech" value="8" type="number"></td>
</tr>
<tr>
<td>工业</td>
<td><input class="input1" name="indu" value="6" type="number"></td>
<td> 信念</td>
<td><input class="input1" name="beli" value="3" type="number"></td>
</tr>
</table>
<!-- </ul> -->
<br><br>
<input class="input2" type="submit" value="开始模拟">
<!-- <input class="input2" type="submit" value="开始模拟" onclick="window.location=('3.html')"> -->
</form>
</header>
<div id="processheader2">
<h2>分配属性</h2>
<h3>您共有可供分配的点数:20</h3>
</div>
<div id="aurorabanner">
<p>您今日节约5g碳</p>
<p>共获得20奥罗拉</p>
<!-- <button id="hide">隐藏</button>
<p>如果你点击“隐藏” 按钮,我将会消失。</p> -->
</div>
<!-- Footer -->
<footer id="footer">
<span class="copyright">© Zero-Carbon Team. Design: <a href="http://www.tsinghua.edu.cn"></a>THU.</span>
</footer>
</div>
</div>
</body>
</html>