-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfans1.html
190 lines (170 loc) · 5.53 KB
/
fans1.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>加好友发福利</title>
<style>
body {
background-color: #f2f2f2;
color: #333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
line-height: 1.5;
padding: 20px;
background-image: linear-gradient(to right, #fdcbf1, #fdab78);
}
.container {
width: 600px;
margin: 0 auto;
border: 2px solid #333;
padding: 40px;
text-align: center;
border-radius: 20px;
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
background-color: #fff;
position: relative;
overflow: hidden;
background-image: url('./boy4.jpg'); /* 添加背景图片 */
background-repeat: no-repeat;
background-size: cover;
}
.bg-decoration {
position: absolute;
top: -50px;
left: -50px;
width: 200px;
height: 200px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.3);
transform: rotate(45deg);
z-index: -1;
animation: rotate 10s ease-in-out infinite;
}
@keyframes rotate {
0% {
transform: rotate(45deg);
}
50% {
transform: rotate(225deg);
}
100% {
transform: rotate(405deg);
}
}
h1 {
font-size: 28px;
font-weight: bold;
margin-top: 0;
margin-bottom: 20px;
animation: color-transition 3s ease infinite alternate;
}
@keyframes color-transition {
0% {
color: #000;
}
50% {
color: #ff00ff;
}
100% {
color: #000;
}
}
img {
width: 200px;
height: 200px;
border-radius: 50%;
margin-top: 20px;
border: 5px solid #fff;
transition: transform 0.3s ease;
}
img:hover {
transform: scale(1.2);
}
.additional-content {
margin-top: 20px;
}
.text {
font-size: 20px;
margin-bottom: 10px;
}
.button {
background-color: #333;
color: #fff;
padding: 10px 20px;
border-radius: 5px;
text-decoration: none;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #666;
}
.fade-in {
animation: fade-in 1s ease-in-out;
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
</head>
<body>
<div class="container fade-in">
<div class="bg-decoration"></div>
<h1>如果寂寞可以来找我聊天</h1>
<!-- <button class="button" onclick="selectImage()">选择本地图片</button>
<script>
function selectImage() {
var input = document.ElementById("imageInput");
input.click();
}
function displayImage(event) {
var imageFile = event.target.files[0];
var imageContainer = document.ElementById("imageContainer");
var image = document.createElement("img");
image.src = URL.createObjecstURL(imageFile);
imageContainer.appendChild(image);
}
var imageInput = document.ElementById("imageInput");
imageInput.EventListener("change", displayImage);
</script> -->
<button class="button" onclick="selectImage()">选择本地图片</button>
<input type="file" id="imageInput" style="display:none;">
<div id="imageContainer"></div>
<script>
function selectImage() {
var input = document.getElementById("imageInput");
input.click();
}
function displayImage(event) {
var imageFile = event.target.files[0];
var imageContainer = document.getElementById("imageContainer");
var image = document.createElement("img");
image.src = URL.createObjectURL(imageFile);
imageContainer.appendChild(image);
}
var imageInput = document.getElementById("imageInput");
imageInput.addEventListener("change", displayImage);
</script>
<div id="imageContainer"></div>
<img id="image" src="./test1.jpg" alt="handsome"/>
<div class="additional-content">
<p class="text">在线预约帅哥请立即点击下面按钮(长得帅的人很忙档期很满,要提前预约)</p>
<button id="myButton" class="button">点击预约</button>
<br><br>
<img id="myImage" src="reservation.png" style="display: none; width: 300px; height: auto;">
</div>
<script>
var button = document.getElementById("myButton");
button.addEventListener("click", function() {
var image = document.getElementById("myImage");
image.style.display = "block";
});
</script>
</div>
</div>
</body>
</html>