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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 8 |
+
<title>Happy New Year 2025</title>
|
| 9 |
+
</head>
|
| 10 |
+
<style>
|
| 11 |
+
@import url("https://fonts.googleapis.com/css2?family=Bilbo+Swash+Caps&family=Poppins:wght@900&display=swap");
|
| 12 |
+
@import url('https://fonts.googleapis.com/css?family=Montserrat:700|Pacifico');
|
| 13 |
+
|
| 14 |
+
*,
|
| 15 |
+
*:after,
|
| 16 |
+
*:before {
|
| 17 |
+
box-sizing: border-box;
|
| 18 |
+
margin: 0;
|
| 19 |
+
padding: 0;
|
| 20 |
+
-webkit-transition: all 100ms ease-in;
|
| 21 |
+
transition: all 100ms ease-in;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
body {
|
| 25 |
+
background-color: #1a1818;
|
| 26 |
+
overflow: hidden;
|
| 27 |
+
height: 100vh;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.msg {
|
| 31 |
+
width: 100%;
|
| 32 |
+
font-family: 'Pacifico', cursive;
|
| 33 |
+
font-size: 100px;
|
| 34 |
+
font-weight: bolder;
|
| 35 |
+
color: #fff;
|
| 36 |
+
text-align: center;
|
| 37 |
+
position: absolute;
|
| 38 |
+
top: 50%;
|
| 39 |
+
opacity: 0;
|
| 40 |
+
animation: message 2s ease-in-out 6s forwards;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
@keyframes message {
|
| 44 |
+
0% {
|
| 45 |
+
opacity: 0;
|
| 46 |
+
margin-top: 0;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
100% {
|
| 50 |
+
opacity: 1;
|
| 51 |
+
margin-top: -200px;
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.y1 {
|
| 56 |
+
color: #fff;
|
| 57 |
+
animation: y1colorful 2s ease-in-out 5.75s forwards;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.y2 {
|
| 61 |
+
color: #fff;
|
| 62 |
+
animation: y2colorful 2s ease-in-out 5.75s forwards;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.y3 {
|
| 66 |
+
color: #fff;
|
| 67 |
+
animation: y3colorful 2s ease-in-out 5.75s forwards;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.y4 {
|
| 71 |
+
color: #fff;
|
| 72 |
+
animation: y4colorful 2s ease-in-out 5.75s forwards;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
@keyframes y1colorful {
|
| 76 |
+
0% {
|
| 77 |
+
color: #fff;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
100% {
|
| 81 |
+
color: #10b3ff;
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
@keyframes y2colorful {
|
| 86 |
+
0% {
|
| 87 |
+
color: #fff;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
100% {
|
| 91 |
+
color: #07be62;
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
@keyframes y3colorful {
|
| 96 |
+
0% {
|
| 97 |
+
color: #fff;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
100% {
|
| 101 |
+
color: #ff8513;
|
| 102 |
+
}
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
@keyframes y4colorful {
|
| 106 |
+
0% {
|
| 107 |
+
color: #fff;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
100% {
|
| 111 |
+
color: #fdab14;
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.old {
|
| 116 |
+
color: #fff;
|
| 117 |
+
position: absolute;
|
| 118 |
+
top: 0%;
|
| 119 |
+
animation: old_animation 2.5s ease-in-out 4s forwards;
|
| 120 |
+
margin-left: -80px;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
@keyframes old_animation {
|
| 124 |
+
0% {
|
| 125 |
+
top: 0%;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
100% {
|
| 129 |
+
top: -250%;
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.year {
|
| 134 |
+
position: absolute;
|
| 135 |
+
top: 450px;
|
| 136 |
+
width: 100%;
|
| 137 |
+
text-align: center;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.year>span {
|
| 141 |
+
font-size: 175px;
|
| 142 |
+
font-weight: 700;
|
| 143 |
+
font-family: "Poppins", sans-serif;
|
| 144 |
+
letter-spacing: -12px;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.first_year {
|
| 148 |
+
margin-right: 100px;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.new {
|
| 152 |
+
position: absolute;
|
| 153 |
+
right: -100px;
|
| 154 |
+
animation: new_animation 5s ease-in-out 1.5s forwards;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
@keyframes new_animation {
|
| 158 |
+
0% {
|
| 159 |
+
right: -100px;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
40% {
|
| 163 |
+
right: 600px;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
90% {
|
| 167 |
+
right: 600px;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
100% {
|
| 171 |
+
right: 720px;
|
| 172 |
+
color: yellow;
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.balloon {
|
| 177 |
+
width: 100px;
|
| 178 |
+
height: 120px;
|
| 179 |
+
border-radius: 50%;
|
| 180 |
+
background-color: rgb(0, 47, 255);
|
| 181 |
+
position: absolute;
|
| 182 |
+
top: 50%;
|
| 183 |
+
right: -100px;
|
| 184 |
+
margin-top: -285px;
|
| 185 |
+
animation: balloon_animation 5s ease-in-out 1.5s forwards;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
.balloon::after {
|
| 189 |
+
content: "";
|
| 190 |
+
width: 4px;
|
| 191 |
+
height: 100px;
|
| 192 |
+
background-color: #fff;
|
| 193 |
+
position: absolute;
|
| 194 |
+
left: 50%;
|
| 195 |
+
margin-left: -2px;
|
| 196 |
+
bottom: -100px;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
.balloon::before {
|
| 200 |
+
content: "";
|
| 201 |
+
border-style: solid;
|
| 202 |
+
border-width: 0 10px 20px 10px;
|
| 203 |
+
border-color: transparent transparent #fd3553 transparent;
|
| 204 |
+
position: absolute;
|
| 205 |
+
left: 50%;
|
| 206 |
+
bottom: -10px;
|
| 207 |
+
margin-left: -10px;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
@keyframes balloon_animation {
|
| 211 |
+
0% {
|
| 212 |
+
right: -120px;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
40% {
|
| 216 |
+
right: 580px;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
50% {
|
| 220 |
+
right: 740px;
|
| 221 |
+
top: 50%;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
100% {
|
| 225 |
+
right: 740px;
|
| 226 |
+
top: -200%;
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
.firework {
|
| 231 |
+
position: relative;
|
| 232 |
+
opacity: 0;
|
| 233 |
+
animation: show_fireworks 2s ease-in-out 5s forwards;
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
@keyframes show_fireworks {
|
| 237 |
+
0% {
|
| 238 |
+
opacity: 0;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
99% {
|
| 242 |
+
opacity: 0;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
100% {
|
| 246 |
+
opacity: 1;
|
| 247 |
+
}
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.cracker {
|
| 251 |
+
position: absolute;
|
| 252 |
+
width: 4px;
|
| 253 |
+
height: 80px;
|
| 254 |
+
transform-origin: 50% 100%;
|
| 255 |
+
overflow: hidden;
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
.cracker::before {
|
| 259 |
+
content: '';
|
| 260 |
+
background-color: gold;
|
| 261 |
+
height: 40px;
|
| 262 |
+
position: absolute;
|
| 263 |
+
left: 0;
|
| 264 |
+
right: 0;
|
| 265 |
+
animation: fire 2s ease-in-out infinite;
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
@keyframes fire {
|
| 269 |
+
0% {
|
| 270 |
+
top: 100%;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
25% {
|
| 274 |
+
top: 50%;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
50% {
|
| 278 |
+
top: -25%;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
75% {
|
| 282 |
+
top: -50%;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
100% {
|
| 286 |
+
top: -50%;
|
| 287 |
+
}
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
.cracker:nth-child(1) {
|
| 291 |
+
transform: rotate(0deg) translateY(-15px);
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.cracker:nth-child(2) {
|
| 295 |
+
transform: rotate(30deg) translateY(-15px);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
.cracker:nth-child(3) {
|
| 299 |
+
transform: rotate(60deg) translateY(-15px);
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.cracker:nth-child(4) {
|
| 303 |
+
transform: rotate(90deg) translateY(-15px);
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.cracker:nth-child(5) {
|
| 307 |
+
transform: rotate(120deg) translateY(-15px);
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.cracker:nth-child(6) {
|
| 311 |
+
transform: rotate(150deg) translateY(-15px);
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
.cracker:nth-child(7) {
|
| 315 |
+
transform: rotate(180deg) translateY(-15px);
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
.cracker:nth-child(8) {
|
| 319 |
+
transform: rotate(210deg) translateY(-15px);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.cracker:nth-child(9) {
|
| 323 |
+
transform: rotate(240deg) translateY(-15px);
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
.cracker:nth-child(10) {
|
| 327 |
+
transform: rotate(270deg) translateY(-15px);
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
.cracker:nth-child(11) {
|
| 331 |
+
transform: rotate(300deg) translateY(-15px);
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
.cracker:nth-child(12) {
|
| 335 |
+
transform: rotate(330deg) translateY(-15px);
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
#firework1 {
|
| 339 |
+
left: 25%;
|
| 340 |
+
top: 50%;
|
| 341 |
+
transform: scale(1);
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
#firework2 {
|
| 345 |
+
left: 50%;
|
| 346 |
+
top: 75%;
|
| 347 |
+
transform: scale(0.5);
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
#firework3 {
|
| 351 |
+
left: 80%;
|
| 352 |
+
top: 15%;
|
| 353 |
+
transform: scale(1.5);
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
canvas {
|
| 357 |
+
position: fixed;
|
| 358 |
+
top: 0;
|
| 359 |
+
left: 0;
|
| 360 |
+
width: 100%;
|
| 361 |
+
height: 100%;
|
| 362 |
+
z-index: -1;
|
| 363 |
+
}
|
| 364 |
+
</style>
|
| 365 |
+
<body>
|
| 366 |
+
<canvas id="Canvas"></canvas>
|
| 367 |
+
<div class="msg">新年快乐</div>
|
| 368 |
+
<div class="year">
|
| 369 |
+
<span class="first_year">
|
| 370 |
+
<span class="y1">2</span>
|
| 371 |
+
<span class="y2">0</span>
|
| 372 |
+
<span class="y3">2</span>
|
| 373 |
+
</span>
|
| 374 |
+
<span class="old">4</span>
|
| 375 |
+
<span class="y4 new">5</span>
|
| 376 |
+
<div class="balloon"></div>
|
| 377 |
+
</div>
|
| 378 |
+
<div class="firework" id="firework1">
|
| 379 |
+
<div class="cracker"></div>
|
| 380 |
+
<div class="cracker"></div>
|
| 381 |
+
<div class="cracker"></div>
|
| 382 |
+
<div class="cracker"></div>
|
| 383 |
+
<div class="cracker"></div>
|
| 384 |
+
<div class="cracker"></div>
|
| 385 |
+
<div class="cracker"></div>
|
| 386 |
+
<div class="cracker"></div>
|
| 387 |
+
<div class="cracker"></div>
|
| 388 |
+
<div class="cracker"></div>
|
| 389 |
+
<div class="cracker"></div>
|
| 390 |
+
<div class="cracker"></div>
|
| 391 |
+
</div>
|
| 392 |
+
<div class="firework" id="firework2">
|
| 393 |
+
<div class="cracker"></div>
|
| 394 |
+
<div class="cracker"></div>
|
| 395 |
+
<div class="cracker"></div>
|
| 396 |
+
<div class="cracker"></div>
|
| 397 |
+
<div class="cracker"></div>
|
| 398 |
+
<div class="cracker"></div>
|
| 399 |
+
<div class="cracker"></div>
|
| 400 |
+
<div class="cracker"></div>
|
| 401 |
+
<div class="cracker"></div>
|
| 402 |
+
<div class="cracker"></div>
|
| 403 |
+
<div class="cracker"></div>
|
| 404 |
+
<div class="cracker"></div>
|
| 405 |
+
</div>
|
| 406 |
+
<div class="firework" id="firework3">
|
| 407 |
+
<div class="cracker"></div>
|
| 408 |
+
<div class="cracker"></div>
|
| 409 |
+
<div class="cracker"></div>
|
| 410 |
+
<div class="cracker"></div>
|
| 411 |
+
<div class="cracker"></div>
|
| 412 |
+
<div class="cracker"></div>
|
| 413 |
+
<div class="cracker"></div>
|
| 414 |
+
<div class="cracker"></div>
|
| 415 |
+
<div class="cracker"></div>
|
| 416 |
+
<div class="cracker"></div>
|
| 417 |
+
<div class="cracker"></div>
|
| 418 |
+
<div class="cracker"></div>
|
| 419 |
+
</div>
|
| 420 |
+
|
| 421 |
+
</body>
|
| 422 |
+
<script>
|
| 423 |
+
var c = document.getElementById("Canvas");
|
| 424 |
+
var ctx = c.getContext("2d");
|
| 425 |
+
|
| 426 |
+
var cwidth, cheight;
|
| 427 |
+
var shells = [];
|
| 428 |
+
var pass= [];
|
| 429 |
+
|
| 430 |
+
var colors = ['#FF5252', '#FF4081', '#E040FB', '#7C4DFF', '#536DFE', '#448AFF', '#40C4FF', '#18FFFF', '#64FFDA', '#69F0AE', '#B2FF59', '#EEFF41', '#FFFF00', '#FFD740', '#FFAB40', '#FF6E40'];
|
| 431 |
+
|
| 432 |
+
window.onresize = function() { reset(); }
|
| 433 |
+
reset();
|
| 434 |
+
function reset() {
|
| 435 |
+
|
| 436 |
+
cwidth = window.innerWidth;
|
| 437 |
+
cheight = window.innerHeight;
|
| 438 |
+
c.width = cwidth;
|
| 439 |
+
c.height = cheight;
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
function newShell() {
|
| 443 |
+
|
| 444 |
+
var left = (Math.random() > 0.5);
|
| 445 |
+
var shell = {};
|
| 446 |
+
shell.x = (1*left);
|
| 447 |
+
shell.y = 1;
|
| 448 |
+
shell.xoff = (0.01 + Math.random() * 0.007) * (left ? 1 : -1);
|
| 449 |
+
shell.yoff = 0.01 + Math.random() * 0.007;
|
| 450 |
+
shell.size = Math.random() * 6 + 3;
|
| 451 |
+
shell.color = colors[Math.floor(Math.random() * colors.length)];
|
| 452 |
+
|
| 453 |
+
shells.push(shell);
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
function newPass(shell) {
|
| 457 |
+
|
| 458 |
+
var pasCount = Math.ceil(Math.pow(shell.size, 2) * Math.PI);
|
| 459 |
+
|
| 460 |
+
for (i = 0; i < pasCount; i++) {
|
| 461 |
+
|
| 462 |
+
var pas = {};
|
| 463 |
+
pas.x = shell.x * cwidth;
|
| 464 |
+
pas.y = shell.y * cheight;
|
| 465 |
+
|
| 466 |
+
var a = Math.random() * 4;
|
| 467 |
+
var s = Math.random() * 10;
|
| 468 |
+
|
| 469 |
+
pas.xoff = s * Math.sin((5 - a) * (Math.PI / 2));
|
| 470 |
+
pas.yoff = s * Math.sin(a * (Math.PI / 2));
|
| 471 |
+
|
| 472 |
+
pas.color = shell.color;
|
| 473 |
+
pas.size = Math.sqrt(shell.size);
|
| 474 |
+
|
| 475 |
+
if (pass.length < 1000) { pass.push(pas); }
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
var lastRun = 0;
|
| 480 |
+
Run();
|
| 481 |
+
function Run() {
|
| 482 |
+
|
| 483 |
+
var dt = 1;
|
| 484 |
+
if (lastRun != 0) { dt = Math.min(50, (performance.now() - lastRun)); }
|
| 485 |
+
lastRun = performance.now();
|
| 486 |
+
|
| 487 |
+
//ctx.clearRect(0, 0, cwidth, cheight);
|
| 488 |
+
ctx.fillStyle = "rgba(0,0,0,0.25)";
|
| 489 |
+
ctx.fillRect(0, 0, cwidth, cheight);
|
| 490 |
+
|
| 491 |
+
if ((shells.length < 10) && (Math.random() > 0.96)) { newShell(); }
|
| 492 |
+
|
| 493 |
+
for (let ix in shells) {
|
| 494 |
+
|
| 495 |
+
var shell = shells[ix];
|
| 496 |
+
|
| 497 |
+
ctx.beginPath();
|
| 498 |
+
ctx.arc(shell.x * cwidth, shell.y * cheight, shell.size, 0, 2 * Math.PI);
|
| 499 |
+
ctx.fillStyle = shell.color;
|
| 500 |
+
ctx.fill();
|
| 501 |
+
|
| 502 |
+
shell.x -= shell.xoff;
|
| 503 |
+
shell.y -= shell.yoff;
|
| 504 |
+
shell.xoff -= (shell.xoff * dt * 0.001);
|
| 505 |
+
shell.yoff -= ((shell.yoff + 0.2) * dt * 0.00005);
|
| 506 |
+
|
| 507 |
+
if (shell.yoff < -0.005) {
|
| 508 |
+
newPass(shell);
|
| 509 |
+
shells.splice(ix, 1);
|
| 510 |
+
}
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
for (let ix in pass) {
|
| 514 |
+
|
| 515 |
+
var pas = pass[ix];
|
| 516 |
+
|
| 517 |
+
ctx.beginPath();
|
| 518 |
+
ctx.arc(pas.x, pas.y, pas.size, 0, 2 * Math.PI);
|
| 519 |
+
ctx.fillStyle = pas.color;
|
| 520 |
+
ctx.fill();
|
| 521 |
+
|
| 522 |
+
pas.x -= pas.xoff;
|
| 523 |
+
pas.y -= pas.yoff;
|
| 524 |
+
pas.xoff -= (pas.xoff * dt * 0.001);
|
| 525 |
+
pas.yoff -= ((pas.yoff + 5) * dt * 0.0005);
|
| 526 |
+
pas.size -= (dt * 0.002 * Math.random())
|
| 527 |
+
|
| 528 |
+
if ((pas.y > cheight) || (pas.y < -50) || (pas.size <= 0)) {
|
| 529 |
+
pass.splice(ix, 1);
|
| 530 |
+
}
|
| 531 |
+
}
|
| 532 |
+
requestAnimationFrame(Run);
|
| 533 |
+
}
|
| 534 |
+
</script>
|
| 535 |
+
</html>
|