-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (66 loc) · 2.25 KB
/
index.html
File metadata and controls
73 lines (66 loc) · 2.25 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/template/aixin/css/style.css?v1.0.269">
<title>❤我爱你❤</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background: url('https://web2.20it.cn/static/back/back780.jpg') no-repeat;
background-size: 100%;
}
#contentToWrite {
color: pink;
text-align: center; /* 将文本水平居中 */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: bounce 2s infinite; /* 添加跃动动画 */
font-size: 36px; /* 调大字体大小 */
}
#canvas {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* 添加其他样式,如果需要的话 */
@keyframes bounce {
0% {
transform: translate(-50%, -50%) translateY(0);
}
50% {
transform: translate(-50%, -50%) translateY(-10px);
}
100% {
transform: translate(-50%, -50%) translateY(0);
}
}
</style>
</head>
<body>
<div id="contentToWrite" class="comments">
<!-- 文本 "我爱你" -->
我爱你
</div>
<canvas id="pinkboard" width="1920" height="947" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"></canvas>
<canvas id="canvas" width="1920" height="947"></canvas>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="https://web.20it.cn/template/aixin/js/main.js?v1.0.269"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
setViewportMeta();
});
function setViewportMeta() {
var viewportContent = "width=device-width, initial-scale=1";
var metaTag = document.createElement("meta");
metaTag.name = "viewport";
metaTag.content = viewportContent;
document.head.appendChild(metaTag);
}
</script>
</body>
</html>