-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
154 lines (121 loc) · 3.71 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>机坪小工具</title>
<link rel="icon" href="/sucai/favicon.ico" type="image/x-icon">
<style type="text/css">
/* 共同样式 */
body {
margin: 0;
font-family: Arial, sans-serif;
}
/********************************/
/********** 电脑端 ***************/
/********************************/
body.desktop .mainContainer {
color: red;
display: flex;
margin-left: 5%;
margin-right: 5%;
justify-content: center;
align-items: flex-start;
gap: 20px; /* 水平间距 */
flex-wrap: wrap;
}
body.desktop .subContainer {
color: red;
margin-bottom: 50px;
text-align: center;
position: relative;
flex: 1 0 auto; /* 自适应宽度 */
}
body.desktop .subContainer img {
width: 220px;
height: 220px; /* 设置图片最大高度 */
object-fit: contain; /* 图片缩放以适应容器 */
}
/********************************/
/********** 移动端 ***************/
/********************************/
body.mobile .subContainer p{
font-size: 34px;
}
body.mobile .mainContainer {
display: flex;
margin: 0 auto;
max-width: 1200px; /* 设置最大宽度 */
justify-content: center;
align-items: flex-start;
gap: 20px; /* 水平间距 */
flex-wrap: wrap;
padding: 15px; /* 外边距 */
}
body.mobile .subContainer {
margin-bottom: 20px; /* 调整元素间距 */
text-align: center;
position: relative;
flex: 1 1 45%; /* 设置每行显示两个元素 */
max-width: calc(50% - 10px); /* 设置每行显示两个元素,减去间距 */
}
body.mobile .subContainer img {
width: 90%;
height: auto;
object-fit: contain;
}
</style>
<script>
// 在页面加载完成时应用默认筛选
window.onload = function() {
//设置body为电脑或桌面样式
if (IsPC()) {
//if (0) {
document.body.classList.add('desktop');
} else {
document.body.classList.add('mobile');
}
};
function IsPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
</script>
</head>
<body>
<div class="mainContainer">
<div class="subContainer">
<a href="panels.html" target="_blank">
<img src="sucai/sucai_cockpit_1.jpg">
<p>A320 & B737 驾驶舱面板</p></a>
</div>
<div class="subContainer">
<a href="https://www.720yun.com/t/6c7jurmyey6#scene_id=25627624" target="_blank">
<img src="sucai/sucai_cockpit.jpg">
<p>驾驶舱【VR】</p></a>
</div>
<div class="subContainer">
<a href="https://www.720yun.com/t/6c7jurmyey6#scene_id=21424142" target="_blank">
<img src="sucai/sucai_wheelwell.jpg">
<p>轮舱【VR】</p></a>
</div>
<div class="subContainer">
<a href="kuaisuchuli.html" target="_blank">
<img src="sucai/sucai_kuaisuchuli.jpg">
<p>快速处理</p></a>
</div>
<div class="subContainer">
<a href="jipingnaxieshi.html" target="_blank">
<img src="sucai/sucai_suoyin.jpg">
<p>机坪那些事</p></a>
</div>
</div>
</body>
</html>