-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.20200322.html
193 lines (165 loc) · 5.12 KB
/
index.20200322.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
<!DOCTYPE html>
<html>
<head>
<title>TQC's page</title>
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<meta charset='UTF-8'/>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<script type="text/javascript" src="./js/jquery.min.js"></script>
<!-- 适配微信 -->
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<link rel="stylesheet" href="https://static.runoob.com/assets/foundation-icons/foundation-icons.css">
<style type="text/css">
body {
background-color: #fff;
margin: 0;
}
.Wrapper {
margin: 3rem;
}
.ImgWrapper {
text-align: left;
}
.ImgWrapper img {
width: 80%;
margin-top: 1.1rem;
margin-bottom: 1.1rem;
float: left;
}
.ProfileWrapper {
color: #000;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
text-align: left;
font-weight: bold;
font-size: 1.2rem;
}
.ProfileWrapper a {
color: black;
text-decoration: none;
}
.ProfileWrapper button {
font-weight: bold;
font-size: 1.2rem;
/*按钮背景透明,文字不透明*/
background-color: rgba(192, 192, 192, 0.3);
margin: 0.3rem;
}
.MusicWrapper {
text-align: left;
}
#playButton{
font-weight: bold;
/*按钮背景透明,文字不透明*/
background-color: rgba(192, 192, 192, 0.3);
width: 2rem;
height: 2rem;
float: right;
}
#playingImg {
width: 2rem;
height: 2rem;
}
.Thank {
border-top: solid;
}
</style>
</head>
<body>
<div class="Wrapper">
<div class="MusicWrapper">
<h4>
背景音乐:
<img id="playingImg" src="./music/assets/playing.gif" alt="">
<button id="playButton" onclick="playButtonClick()"><i class="fi-play"></i></button>
<br>战争
<br>陈冠希 / 陈奂仁
</h4>
<!--歌词-->
<audio style="width: 100%" id="player" class="player"
src="music/audios/zhanzheng.mp3"
loop autoplay="autoplay"
onpause="playerOnPause()"
onplay="playerOnPlay()">
该浏览器不支持音乐
</audio>
</div>
<div class="ProfileWrapper">
<div style="border-bottom: solid;">
阿昌 Java程序员
</div>
<br> ● 坐标:北京
<br> ● 西安理工大学-计算机科学-18届
<br> ● 南宁二中
<br> ● 生日:1996-03-07
<br><span id="wechat"> ● 微信:tqc935749228</span>
<br><span id="wechat"> ● 邮箱:[email protected]</span>
</div>
<div class="ImgWrapper">
<img id="mainImg" src="assets/man.jpg">
</div>
<br>
<div class="ProfileWrapper">
<a target="_blank" href="https://tqccc.gitee.io/gitbook/resume/resume.html"><button>简 历</button></a>
<a target="_blank" href="https://tqccc.gitee.io/"><button>主 页</button></a>
<a target="_blank" href="https://weibo.com/tqccc"><button>微 博</button></a>
<a target="_blank" href="https://github.com/TQCCC"><button>Github</button></a>
<a target="_blank" href="http://blog.csdn.net/HingCheung"><button>CSDN技术博客</button></a>
<a target="_blank" href="mailto:[email protected]"><button>✉ 邮件</button></a>
</div>
<br>
<div class="Thank">
<h3> ● 致谢</h3>
<div style="font-weight: bold;">
感谢您花时间阅读我的主页
</div>
</div>
</div>
<script type="text/javascript">
// 控制歌词同步
var player = document.getElementById('player');
var playButton = document.getElementById('playButton');
function playerOnPause() {
if (playButton === null) {
return;
}
playButton.innerHTML = "<i class='fi-play'></i>";
}
function playerOnPlay() {
if (playButton === null) {
return;
}
playButton.innerHTML = "<i class='fi-pause'></i>";
}
function playButtonClick() {
if (player === null) {
return;
}
if (player.paused === false) {
pauseMusic();
} else {
playMusic();
}
}
function playMusic() {
player.play();
}
function pauseMusic() {
player.pause();
}
var hasAutoPlay = false;
function autoPlay() {
if (hasAutoPlay === false) {
player.play();
hasAutoPlay = true;
}
}
// 适配微信
document.addEventListener("WeixinJSBridgeReady", autoPlay, false);
// 移动端
// document.addEventListener('touchstart', autoPlay);
// document.addEventListener('mousedown', autoPlay);
</script>
</body>
</html>