❤ 精彩专栏推荐👇🏻👇🏻👇🏻
💂 作者主页: 【进入主页—🚀获取更多源码】
🎓 web前端期末大作业: 【📚HTML5网页期末作业 (1000套) 】
🧡 程序员有趣的告白方式:【💌HTML七夕情人节表白网页制作 (125套) 】
七夕来袭!是时候展现专属于程序员的浪漫了!你打算怎么给心爱的人表达爱意?鲜花礼物?代码表白?还是创意DIY?或者…无论那种形式,快来秀我们一脸吧!


📂文章目录

  • 二、📚网站介绍
  • 三、🔗网站效果
    • ▶️1.视频演示
    • 🧩 2.图片演示
  • 四、💒 网站代码
    • 🧱HTML结构代码
    • 🏠CSS样式代码
  • 五、🎁更多源码


二、📚网站介绍

📒网站文件方面:html网页结构文件、css网页样式文件、js网页特效文件、images网页图片文件;

📙网页编辑方面:可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。
其中:
(1)📜html文件包含:其中index.html是首页、其他html为二级页面;
(2)📑 css文件包含:css全部页面样式,3D动态效果,雪花飘落等等
(3)📄 js文件包含:页面炫酷效果实现


三、🔗网站效果

▶️1.视频演示

115 生日蛋糕树(可自定义文字)

🧩 2.图片演示


四、💒 网站代码

🧱HTML结构代码

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>生日快乐</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  
      <link rel="stylesheet" href="css/style.css">
    <style>
      .Birthday{
        font-size: 35px;
        color: yellow;
        text-align: center;
        z-index: 9999;
      }
    </style>
</head>

<body>

  <main>
    <audio src="music/3.mp3" autoplay="autoplay" loop="loop"></audio>
    <div class="Birthday"> 菁菁&nbsp;&nbsp;&nbsp;生日快乐!</div>
  <ul class="star" style="--v: 1; --t: 1;">
    <li style="--i: 0"></li>
  </ul>
  <ul style="--v: 2; --t: 8; --direction:reverse">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
  </ul>
  <ul style="--v: 3; --t: 12">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
  </ul>
  <ul style="--v: 4; --t: 18; --direction:reverse">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
    <li style="--i: 12"></li>
    <li style="--i: 13"></li>
    <li style="--i: 14"></li>
    <li style="--i: 15"></li>
    <li style="--i: 16"></li>
    <li style="--i: 17"></li>
  </ul>
  <ul style="--v: 5; --t: 22">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
    <li style="--i: 12"></li>
    <li style="--i: 13"></li>
    <li style="--i: 14"></li>
    <li style="--i: 15"></li>
    <li style="--i: 16"></li>
    <li style="--i: 17"></li>
    <li style="--i: 18"></li>
    <li style="--i: 19"></li>
    <li style="--i: 20"></li>
    <li style="--i: 21"></li>
  </ul>
  <ul style="--v: 6; --t: 26; --direction:reverse">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
    <li style="--i: 12"></li>
    <li style="--i: 13"></li>
    <li style="--i: 14"></li>
    <li style="--i: 15"></li>
    <li style="--i: 16"></li>
    <li style="--i: 17"></li>
    <li style="--i: 18"></li>
    <li style="--i: 19"></li>
    <li style="--i: 20"></li>
    <li style="--i: 21"></li>
    <li style="--i: 22"></li>
    <li style="--i: 23"></li>
    <li style="--i: 24"></li>
    <li style="--i: 25"></li>
  </ul>
  <ul style="--v: 7; --t: 32">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
    <li style="--i: 12"></li>
    <li style="--i: 13"></li>
    <li style="--i: 14"></li>
    <li style="--i: 15"></li>
    <li style="--i: 16"></li>
    <li style="--i: 17"></li>
    <li style="--i: 18"></li>
    <li style="--i: 19"></li>
    <li style="--i: 20"></li>
    <li style="--i: 21"></li>
    <li style="--i: 22"></li>
    <li style="--i: 23"></li>
    <li style="--i: 24"></li>
    <li style="--i: 25"></li>
    <li style="--i: 26"></li>
    <li style="--i: 27"></li>
    <li style="--i: 28"></li>
    <li style="--i: 29"></li>
    <li style="--i: 30"></li>
    <li style="--i: 31"></li>
  </ul>
  <ul style="--v: 8; --t: 36; --direction:reverse">
    <li style="--i: 0"></li>
    <li style="--i: 1"></li>
    <li style="--i: 2"></li>
    <li style="--i: 3"></li>
    <li style="--i: 4"></li>
    <li style="--i: 5"></li>
    <li style="--i: 6"></li>
    <li style="--i: 7"></li>
    <li style="--i: 8"></li>
    <li style="--i: 9"></li>
    <li style="--i: 10"></li>
    <li style="--i: 11"></li>
    <li style="--i: 12"></li>
    <li style="--i: 13"></li>
    <li style="--i: 14"></li>
    <li style="--i: 15"></li>
    <li style="--i: 16"></li>
    <li style="--i: 17"></li>
    <li style="--i: 18"></li>
    <li style="--i: 19"></li>
    <li style="--i: 20"></li>
    <li style="--i: 21"></li>
    <li style="--i: 22"></li>
    <li style="--i: 23"></li>
    <li style="--i: 24"></li>
    <li style="--i: 25"></li>
    <li style="--i: 26"></li>
    <li style="--i: 27"></li>
    <li style="--i: 28"></li>
    <li style="--i: 29"></li>
    <li style="--i: 30"></li>
    <li style="--i: 31"></li>
    <li style="--i: 32"></li>
    <li style="--i: 33"></li>
    <li style="--i: 34"></li>
    <li style="--i: 35"></li>
  </ul>
</main>
  
  

</body>

</html>





🏠CSS样式代码

:root {
  --unit: 1.6vmin;
  --width: calc(var(--unit) * 6);
  --height: calc(var(--unit) * 8);
}

ul, li {
  position: absolute;
  width: var(--width);
  height: var(--height);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) var(--transform, translate(0,0));
  transform-style: preserve-3d;
  z-index: -1;
}
li {
  background: hsl(calc(var(--i) * 360 / var(--t)), 100%, 53%);
  background: radial-gradient(circle, hsl(216, 88%, 86%) 22%, hsl(216, 88%, 26%) 22%) top center;
  background-size: calc(var(--unit) * 1.5) calc(var(--unit) * 1.5);
  --clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
  --transform: rotateY(calc(var(--i) * calc(360deg / var(--t)))) translateZ(calc(var(--width) * .09 * var(--t))) rotateX(0deg);
  transform-origin: 50% 100%;
  
  -webkit-clip-path: var(--clip-path);
  clip-path: var(--clip-path);
}
li:nth-of-type(even) {
  --clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
}
li:nth-of-type(6n + 2) {
  background: linear-gradient(to right, hsl(343, 88%, 56%) 50%, hsl(343, 88%, 36%) 50%);
}
li:nth-of-type(6n + 3) {
  background-image: linear-gradient(to bottom, hsl(143, 70%, 18%) 0vmin, hsl(143, 70%, 18%) 1.8vmin, hsl(143, 70%, 78%) 1.8vmin, hsl(143, 70%, 78%) 2vmin);
}
li:nth-of-type(6n + 4) {
  background:
    repeating-linear-gradient(135deg, hsla(347, 88%, 76%, 0) 0, hsla(347, 88%, 76%, 0) calc(var(--unit) * .75), hsl(223, 88%, 46%) calc(var(--unit) * .75), hsl(223, 88%, 46%) calc(var(--unit) * 1.5)),
    repeating-linear-gradient(45deg, hsl(347, 88%, 46%) 0, hsl(347, 88%, 46%) var(--unit), hsl(143, 38%, 36%) var(--unit), hsl(143, 38%, 36%) calc(var(--unit) * 1.5));
  background-size: contain;
}
li:nth-of-type(6n + 5) {
  background: linear-gradient(to right, hsl(43, 88%, 36%) 50%, hsl(43, 88%, 56%) 50%);
}
li:nth-of-type(6n + 6) {
  --color: hsl(243, 8%, 86%);
  --alt: hsl(342, 88%, 46%);
  background: linear-gradient(to right, var(--color) 50%, hsl(243, 8%, 66%) 50%);
}
@supports ( background-image: repeating-conic-gradient(at 50% 36%, red 30deg, red 45deg, green 45deg, green 60deg)) {
  li:nth-of-type(6n + 6) {
    background-image: 
      repeating-conic-gradient(at 50% 36%,
        var(--color) 30deg,
        var(--color) 45deg,
        var(--alt) 45deg,
        var(--alt) 60deg);
  }
}
ul {
  top: 8vmin;
  animation: display-case calc(var(--t) * 1000ms) infinite linear;
  animation-direction: var(--direction, normal);
  animation-delay: -10000ms;
}
.star {
  animation-duration: calc(var(--t) * 4000ms);
}
.star li {
  --clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  --transform: translateY(-4vmin);
  background: linear-gradient(to right, hsl(43, 88%, 36%) 50%, hsl(43, 88%, 56%) 50%);
}

@keyframes display-case {
  0% {
    transform: translate(-50%, -100%) rotateY(0deg) translateY(calc(var(--v, 0) * 6 * var(--unit)));
  }
  100% {
    transform: translate(-50%, -100%) rotateY(360deg) translateY(calc(var(--v, 0) * 6 * var(--unit)));
  }
}


@keyframes topsy-turvy {
  0% {
    transform: translate(-50%, -100%) rotateY(0deg) translateY(calc(var(--v, 0) * 6 * var(--unit))) rotateZ(-5deg);
  }
  50% {
    transform: translate(-50%, -100%) rotateY(180deg) translateY(calc(var(--v, 0) * 6 * var(--unit))) rotateZ(5deg);
  }
  100% {
    transform: translate(-50%, -100%) rotateY(360deg) translateY(calc(var(--v, 0) * 6 * var(--unit))) rotateZ(-5deg);
  }
}

main {
  width: 100vmin;
  height: 100vmin;
  transform-style: preserve-3d;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  perspective: 120vmin;
  background: hsl(216, 80%, 12%);
  background-image: radial-gradient(circle at 50% 55%, hsl(216, 80%, 32%), hsl(216, 80%, 22%) 24vmin, hsl(216, 80%, 12%) 44vmin);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}






五、🎁更多源码

1.如果我的博客对你有帮助 请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!

2.💗【👇🏻👇🏻👇🏻🉑关注我| 获取更多源码】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、等!

📣以上内容技术相关问题💌欢迎一起交流学习👇🏻👇🏻👇🏻

更多推荐

超炫酷生日快乐网页源代码_最炫表白网站源码_html生日快乐网站制作