-
Notifications
You must be signed in to change notification settings - Fork 0
/
ppt.php
85 lines (82 loc) · 1.82 KB
/
ppt.php
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ACG图片PPT展示</title>
<?php
include "config.php";
start();
?>
<style>
html,
body {
font-size: 20px;
margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.bg {
width: 100%;
height: 100%;
position: fixed;
z-index: -1;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
animation: bg 10s infinite;
}
#bg2 {
animation-delay: 5s;
}
@keyframes bg{
0%{transform: scale(1.5, 1.5);opacity: 0;}
20%{opacity: 1;}
30%{transform: scale(1, 1);}
50%{opacity: 1;}
70%{opacity: 0;}
100%{opacity: 0;}
}
</style>
</head>
<body>
<div id="bg2" class="bg"></div>
<div id="bg1" class="bg"></div>
<script type="text/javascript">
countImg = 1;
countTime = 0;
setInterval(function(){
countTime += 1;
if(countTime % 10 == 7){
countImg += 1;
$.ajax({url:"getimg.php",success:function(result){
url="url("+result+")";
//alert(url)
$("#bg1").css("background-image",url);
}});
}else if((countTime + 5) % 10 == 7){
countImg += 1;
$.ajax({url:"getimg.php",success:function(result){
url="url("+result+")";
//alert(url)
$("#bg2").css("background-image",url);
}}); }
}, 1000);
</script>
<script type='text/javascript'>
window.oncontextmenu=function(){return false;}
window.onkeydown = window.onkeyup = window.onkeypress = function () {
window.event.returnValue = false;
return false;
}
</script>
<?php
$url=getfirstimg();
echo "<script>$(\"#bg1\").css(\"background-image\",\"url($url)\")</script>";
?>
</body>
</html>