新年快乐,动态烟花及祝福代码,能通过微信发送
时间: 2023-02-14 14:29:28 浏览: 144
新年快乐!
这是一个动态烟花代码的例子:
```
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: black;
}
.fireworks {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.fireworks__firework {
position: absolute;
top: -10%;
left: 0%;
width: 1px;
height: 1px;
background-color: white;
border-radius: 50%;
animation: firework 1s ease-in-out infinite;
}
@keyframes firework {
0% {
top: -10%;
left: 0%;
width: 1px;
height: 1px;
opacity: 1;
}
25% {
width: 6px;
height: 6px;
opacity: 1;
}
50% {
width: 12px;
height: 12px;
opacity: 0.5;
}
75% {
width: 24px;
height: 24px;
opacity: 0;
}
100% {
top: 110%;
left: 50%;
width: 6px;
height: 6px;
opacity: 0;
}
}
.fireworks__firework--red {
--bg-color: #f44336;
animation-delay: 0s;
}
.fireworks__firework--yellow {
--bg-color: #ffff00;
animation-delay: 0.2s;
}
.fireworks__firework--blue {
--bg-color: #2196f3;
animation-delay: 0.4s;
}
.fireworks__firework--green {
--bg-color: #4caf50;
animation-delay: 0.6s;
}
</style>
</head>
<body>
<div class="fireworks">
<div class="fireworks__firework fireworks__firework--red"></div>
<div class="fireworks__firework fireworks__firework--yellow"></div>
<div class="fireworks__firework fireworks__firework--blue"></div>
<div class="fireworks__firework fireworks__firework--green"></div>
</div>
</body>
</html>
```
这是一个简单的新年祝福代码的例子:
```
<html>
<body>
<h1>新年快乐!</h1>
<p>愿你在新的一年里,拥有健康、幸福、快乐!</p>
</body>
</html>
```
你可以将这
阅读全文