-
Notifications
You must be signed in to change notification settings - Fork 0
/
u.html
216 lines (216 loc) · 6.11 KB
/
u.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<script src="js/jquery.min.js"></script>
<style>
*{margin: 0;
padding: 0;}
.container{
width: 300px;
height: 300px;
margin: 300px auto;
perspective: 20000px;
}
.box{
width: 300px;
height: 300px;
border: 1px solid transparent;
position: relative;
box-sizing: border-box;
transform-style: preserve-3d;
animation: rotate 10s linear infinite;
}
@keyframes rotate{
0%{
transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}
100%{
transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
}
}
.box-page{
width: 300px;
height: 300px;
position: absolute;
box-sizing: border-box;
transform-style: preserve-3d;
}
.top{
transform: translateZ(150px);
}
.bottom{
transform: translateZ(-150px) rotateX(180deg);
}
.left{
transform: translateX(-150px) rotateY(-90deg);
}
.right{
transform: translateX(150px) rotateY(90deg);
}
.before{
transform: translateY(150px) rotateX(-90deg);
}
.after{
transform: translateY(-150px) rotateX(90deg);
}
.box-page div:nth-child(1){
animation: a1 5.20s ease-in;
}
.box-page div:nth-child(2){
animation: a1 5.20s ease-in 0.5s;
}
.box-page div:nth-child(3){
animation: a1 5.20s ease-in 1s;
}
.box-page div:nth-child(4){
animation: a1 5.20s ease-in 1.5s;
}
.box-page div:nth-child(5){
animation: a1 5.20s ease-in-out 2s;
}
.box-page div:nth-child(6){
animation: a1 5.20s ease-in 2.5s;
}
.box-page div:nth-child(7){
animation: a1 5.20s ease-in 3s;
}
.box-page div:nth-child(8){
animation: a1 5.20s ease-in 3.5s;
}
.box-page div:nth-child(9){
animation: a1 5.20s ease-in 3.5s;
}
@keyframes a1{
/*不动*/
0%{
/*scale缩放比例*/
transform: translateZ(0px) scale(1) rotateZ(0deg);
}
/*飞出去,飞没了*/
20%{
/*scale缩放比例,边飞边旋转*/
transform: translateZ(90px) scale(0.5) rotateZ(180deg);
}
50%{
transform: translateZ(180px) scale(0) rotateZ(360deg);
}
/*飞回来*/
80%{
transform: translateZ(300px) scale(0.5) rotateZ(720deg);
}
100%{
transform: translateZ(0px) scale(1) rotateZ(0deg);
}
}
/* music */
@-webkit-keyframes reverseRotataZ{
0%{-webkit-transform: rotateZ(0deg);}
100%{-webkit-transform: rotateZ(-360deg);}
}
@-webkit-keyframes rotataZ{
0%{-webkit-transform: rotateZ(0deg);}
100%{-webkit-transform: rotateZ(360deg);}
}
#musicControl { position:fixed;right:10px;top:20px;margin-top:0;display:inline-block;z-index:99999999}
#musicControl a { display:inline-block;width:25px;height:25px;overflow:hidden;background:url('images/mcbg.png') no-repeat;background-size:100%;}
#musicControl a audio{width:100%;height:56px;}
#musicControl a.stop { background-position:left bottom;}
#musicControl a.on { background-position:0px 1px;-webkit-animation: reverseRotataZ 5.20s linear infinite;}
#music_play_filter{width:100%;height:100%;overflow:hidden;position:fixed;top:0;left:0;z-index:99999998;}
</style>
</head>
<body>
<div class="container">
<div class="box">
<div class="box-page top animation"></div>
<div class="box-page bottom"></div>
<div class="box-page left"></div>
<div class="box-page right"></div>
<div class="box-page before"></div>
<div class="box-page after"></div>
</div>
</div>
<script>
var arr = document.querySelectorAll(".box>div")
for (var a = 0; a < arr.length; a++) {
for (var i = 0; i < 3; i++) {
for (var j = 0; j < 3; j++) {
var divs = document.createElement("div")
divs.style.cssText = "width:100px;height:100px;border: 2px solid #fff;box-sizing: border-box;position: absolute;background-image: url(images/"+(a+1)+".png);background-size:300px 300px;"
arr[a].appendChild(divs)
divs.style.left = j * 100 + "px"
divs.style.top = i * 100 + "px"
divs.style.backgroundPositionX = -j * 100 + "px"
divs.style.backgroundPositionY = -i * 100 + "px"
}
}
}
/* music */
function play_music(){
if ($('#mc_play').hasClass('on')){
$('#mc_play audio').get(0).pause();
$('#mc_play').attr('class','stop');
}else{
$('#mc_play audio').get(0).play();
$('#mc_play').attr('class','on');
}
$('#music_play_filter').hide();
event.stopPropagation(); //阻止冒泡
}
function just_play(id){
$('#mc_play audio').get(0).play();
$('#mc_play').attr('class','on');
if (typeof(id)!='undefined'){
$('#music_play_filter').hide();
}
event.stopPropagation(); //阻止冒泡
}
function is_weixn(){
return false;
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
return true;
} else {
return false;
}
}
var play_filter=document.getElementById('music_play_filter');
play_filter.addEventListener('click', function(){
just_play(1);
});
play_filter.addEventListener('touchstart', function(){
just_play(1);
});
play_filter.addEventListener('touchend', function(){
just_play(1);
});
play_filter.addEventListener('touchmove', function(){
just_play(1);
});
play_filter.addEventListener('mousedown', function(){
just_play(1);
});
play_filter.addEventListener('mouseup', function(){
just_play(1);
});
play_filter.addEventListener('mousemove',function(){
just_play(1);
});
window.onload=function(){
if (!is_weixn()){
just_play();
}
}
</script>
<span id="musicControl">
<a id="mc_play" class="stop" onclick="play_music();">
<audio id="musicfx" loop="loop" autoplay="autoplay">
<source src="https://sharefs.yun.kugou.com/202005231518/e51cd5c1358775f34bd080e323979c0e/G171/M04/19/0D/i5QEAF102ByAPFFXADKZ9b7Ptx0275.mp3" type="audio/mpeg">
</audio>
</a>
</span>
</body>
</html>