-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
89 lines (87 loc) · 1.79 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
<!DOCTYPE html>
<html>
<head>
<title>弹珠台</title>
<style type="text/css">
body {
height: 100vh;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #1a3c5c;
background-image: linear-gradient(120deg, #012548, #847b2a);
background-attachment: fixed;
}
#game-in-iphone {
width: 876px;
height: 429px;
background-image: url(images/iphone.png);
}
#game-in-iphone>iframe {
position: relative;
left: 106px;
top: 28px;
border: 0;
opacity: 0;
transition: all 2s;
}
h2, h3 {
display: block;
color: #fff;
}
#side {
padding-left: 20px;
}
ul {
color: rgb(155, 158, 157);
}
.contain {
display: flex;
width: 100%;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
}
.show {
opacity: 1 !important;
}
</style>
</head>
<body>
<h2>魔法禁书目录弹珠台模拟</h2>
<div class="contain">
<div id="side">
<h3>玩法介绍</h3>
<ul>
<li>点击弹一次开始游戏</li>
<li>点击黄色手掌按钮开始蓄力</li>
<li>再次点击黄色手掌按钮开始发射弹珠</li>
<li>中间带颜色的球可以拖动</li>
</ul>
</div>
<div id="game-in-iphone">
</div>
</div>
<script>
var iframe = document.createElement("iframe");
iframe.src = "game.html";
iframe.width = 667;
iframe.height = 375;
iframe.scrolling = 'auto';
var parent = document.getElementById('game-in-iphone');
if (iframe.attachEvent) {
iframe.attachEvent("onload", function () {
iframe.className = 'show';
});
} else {
iframe.onload = function () {
iframe.className = 'show';
};
}
parent.appendChild(iframe);
</script>
</body>
</html>