• 嫦娥奔月html+css


    中秋佳节,从古至今就有嫦娥奔月之神话。

    嫦娥奔月源自古代人民对于星辰的崇拜与向往,最早出自《归藏》,后来民间把故事进一步发挥,演化成多个版本。最为人们所熟知的既是嫦娥偷吃他丈夫羿从西王母那里得来的不死药,飞升上月。

    我下面就简单做一个嫦娥奔月的动态界面:

    效果:因为csdn传动图不能大于5M,所以有些失真

    代码如下:

    HTML:

    1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>Document</title>
    8. <link rel="stylesheet" type="text/css" href="star.css">
    9. </head>
    10. <body>
    11. <div class="ya1"><img src="1.png" width="300"></div>
    12. <div class="moon1"></div>
    13. <section>
    14. <span></span>
    15. <span></span>
    16. <span></span>
    17. <span></span>
    18. <span></span>
    19. <span></span>
    20. <span></span>
    21. <span></span>
    22. <span></span>
    23. <span></span>
    24. </section>
    25. </body>
    26. </html>

     CSS如下:

    1. *{
    2. margin:0;
    3. padding:0;
    4. box-sizing: border-box;
    5. }
    6. section{
    7. position: absolute;
    8. top:0;
    9. left:0;
    10. width: 100%;
    11. height:100vh;
    12. background-position: center;
    13. background-size: cover;
    14. }
    15. span{
    16. position: absolute;
    17. width: 4px;
    18. height: 4px;
    19. background-color: #fff;
    20. top:50%;
    21. left:50%;
    22. border-radius: 50%;
    23. box-shadow: 0 0 0 4px rgba(255,255,255, 0.1),
    24. 0 0 0 0px rgba(255,255,255, 0.1),
    25. 0 0 20px rgba(255,255,255, 1),;
    26. animation: animate 3s linear infinite;
    27. }
    28. span::before{
    29. content: '';
    30. position: absolute;
    31. top:50%;
    32. transform: translateY(-50%);
    33. width:300px;
    34. height: 1px;
    35. background:linear-gradient(90deg,#fff,transparent);
    36. }
    37. @keyframes animate {
    38. 0%{
    39. transform: rotate(315deg) translateX(0);
    40. opacity: 1;
    41. }
    42. 70%{
    43. opacity: 1;
    44. }
    45. 100%{
    46. transform: rotate(315deg) translateX(-1000px);
    47. opacity: 0;
    48. }
    49. }
    50. span:nth-child(1){
    51. top:0;
    52. right: 0;
    53. animation-delay: 0;
    54. animation-duration: 1s;
    55. }
    56. span:nth-child(2){
    57. top:0;
    58. right: 80px;
    59. left:initial;
    60. animation-delay: 0.2s;
    61. animation-duration: 3s;
    62. }
    63. span:nth-child(3){
    64. top:80px;
    65. right: 0px;
    66. left: initial;
    67. animation-delay: 0.4s;
    68. animation-duration: 2s;
    69. }
    70. span:nth-child(4){
    71. top:0px;
    72. right: 180px;
    73. animation-delay: 0.6s;
    74. animation-duration: 1.5s;
    75. }
    76. span:nth-child(5){
    77. top:0;
    78. right: 400px;
    79. left: initial;
    80. animation-delay: 0.8s;
    81. animation-duration: 2.5s;
    82. }
    83. span:nth-child(6){
    84. top:0;
    85. right: 600px;
    86. left: initial;
    87. animation-delay: 1;
    88. animation-duration: 3s;
    89. }
    90. span:nth-child(7){
    91. top:300px;
    92. right: 0px;
    93. left: initial;
    94. animation-delay: 1.2s;
    95. animation-duration: 1.75s;
    96. }
    97. span:nth-child(8){
    98. top:0px;
    99. right:700px;
    100. left: initial;
    101. animation-delay: 1.4s;
    102. animation-duration: 1.75s;
    103. }
    104. span:nth-child(9){
    105. top:0px;
    106. right: 1000px;
    107. left: initial;
    108. animation-delay: 0.75s;
    109. animation-duration: 2.25s;
    110. }
    111. span:nth-child(10){
    112. top:0px;
    113. right: 450px;
    114. left: initial;
    115. animation-delay: 2.75s;
    116. animation-duration: 2.25s;
    117. }
    118. body{
    119. height: 100vh;
    120. display: flex;
    121. justify-content: center;
    122. align-items: center;
    123. background-color: rgb(106, 105, 105);
    124. background:radial-gradient(150% 95% at bottom center,rgb(67, 19, 122) 20%,rgb(6,6,70) 55%,rgb(7,7,70) 70%,rgb(18, 2, 56) 85%,rgb(5, 1, 22) 100%);
    125. }
    126. div{
    127. margin-right: 30px;
    128. }
    129. .moon1{
    130. margin-left:200px;
    131. margin-top: -480px;
    132. width: 8em;
    133. height: 8em;
    134. border-radius: 50%;
    135. background-color: white;
    136. box-shadow: 0 0 20px white;
    137. animation: move 3s linear infinite;
    138. }
    139. @keyframes move {
    140. 0%{
    141. width:8em;
    142. height:8em;
    143. }
    144. 50%{
    145. width:10em;
    146. height:10em;
    147. }
    148. 100%{
    149. width: 8em;
    150. height: 8em;
    151. }
    152. }
    153. .ya1{
    154. width:500px;
    155. height:500px;
    156. overflow: hidden;
    157. margin-top:20px ;
    158. margin-left: 100px;
    159. transform: rotateY(180deg);
    160. }

    span标签和section标签是关于流星运动的代码,

    ya1是关于仙女的,moon1是关于月亮的。

    仙女素材:ps应用不熟练,扣的有点丑,请诸位见谅

    我们在中秋节的习俗之一就是吃月饼,就是吃月饼。

    吃月饼的典故有何而来呢:

    中秋节吃月饼相传始于元代。据说,当时,中原广大人民不堪忍受元朝统治阶级的残酷统治,纷纷起义抗元。朱元璋联合各路反抗力量准备起义。但朝庭官兵搜查的十分严密,传递消息十分困难。军师刘伯温便想出一计策,命令属下把藏有“八月十五夜起义”的纸条藏入饼子里面,再派人分头传送到各地起义军中,通知他们在八月十五日晚上起义响应。到了起义的那天,各路义军一齐响应。

    很快,徐达就攻下元大都,起义成功了。消息传来,朱元璋高兴得连忙传下口谕,在即将来临的中秋节,让全体将士与民同乐,并将当年起兵时以秘密传递信息的“月饼”,作为节令糕点赏赐群臣。此后,“月饼”制作越发精细,品种更多。之后中秋节吃月饼的习俗便在民间流传开来。

    我希望作为华夏子孙的我们,虽未经历过历史,但也不能不知历史,也不能忘了历史,中华文化源远流长,时至今日,我们竟不得不用放假来衡量节日。以史为镜,以史明志,知史方能成事!!

    最后,希望大家中秋节可以开心快乐,阖家团圆,平平安安♥

  • 相关阅读:
    每天记录学习的新知识:RxJava2 操作符
    esp32经典蓝牙和单片机连接,,,手机蓝牙作为主机
    用 Flutter 的 Canvas 画点有趣的图形
    ChatGPT-GPT4:将AI技术融入科研、绘图与论文写作的实践
    node使用node-xlsx实现excel的下载与导入,保证你看的明明白白
    RadiantQ jQuery甘特图,资源分配单元计算的支持
    MySQL索引原理以及SQL优化
    实训三:多表查询 - 大学数据库创建与查询实战
    损失函数-最小二乘法推导
    JavaSE之泛型和通配符
  • 原文地址:https://blog.csdn.net/weixin_49627122/article/details/126629634