新年快乐,动态烟花及祝福代码,能通过微信发送
新年快乐!
这是一个动态烟花代码的例子:
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>
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
