中秋佳节,从古至今就有嫦娥奔月之神话。
嫦娥奔月源自古代人民对于星辰的崇拜与向往,最早出自《归藏》,后来民间把故事进一步发挥,演化成多个版本。最为人们所熟知的既是嫦娥偷吃他丈夫羿从西王母那里得来的不死药,飞升上月。
我下面就简单做一个嫦娥奔月的动态界面:
效果:因为csdn传动图不能大于5M,所以有些失真
代码如下:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="star.css">
</head>
<body>
<div class="ya1"><img src="1.png" width="300"></div>
<div class="moon1"></div>
<section>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</section>
</body>
</html>
CSS如下:
*{
margin:0;
padding:0;
box-sizing: border-box;
}
section{
position: absolute;
top:0;
left:0;
width: 100%;
height:100vh;
background-position: center;
background-size: cover;
}
span{
position: absolute;
width: 4px;
height: 4px;
background-color: #fff;
top:50%;
left:50%;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(255,255,255, 0.1),
0 0 0 0px rgba(255,255,255, 0.1),
0 0 20px rgba(255,255,255, 1),;
animation: animate 3s linear infinite;
}
span::before{
content: '';
position: absolute;
top:50%;
transform: translateY(-50%);
width:300px;
height: 1px;
background:linear-gradient(90deg,#fff,transparent);
}
@keyframes animate {
0%{
transform: rotate(315deg) translateX(0);
opacity: 1;
}
70%{
opacity: 1;
}
100%{
transform: rotate(315deg) translateX(-1000px);
opacity: 0;
}
}
span:nth-child(1){
top:0;
right: 0;
animation-delay: 0;
animation-duration: 1s;
}
span:nth-child(2){
top:0;
right: 80px;
left:initial;
animation-delay: 0.2s;
animation-duration: 3s;
}
span:nth-child(3){
top:80px;
right: 0px;
left: initial;
animation-delay: 0.4s;
animation-duration: 2s;
}
span:nth-child(4){
top:0px;
right: 180px;
animation-delay: 0.6s;
animation-duration: 1.5s;
}
span:nth-child(5){
top:0;
right: 400px;
left: initial;
animation-delay: 0.8s;
animation-duration: 2.5s;
}
span:nth-child(6){
top:0;
right: 600px;
left: initial;
animation-delay: 1;
animation-duration: 3s;
}
span:nth-child(7){
top:300px;
right: 0px;
left: initial;
animation-delay: 1.2s;
animation-duration: 1.75s;
}
span:nth-child(8){
top:0px;
right:700px;
left: initial;
animation-delay: 1.4s;
animation-duration: 1.75s;
}
span:nth-child(9){
top:0px;
right: 1000px;
left: initial;
animation-delay: 0.75s;
animation-duration: 2.25s;
}
span:nth-child(10){
top:0px;
right: 450px;
left: initial;
animation-delay: 2.75s;
animation-duration: 2.25s;
}
body{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: rgb(106, 105, 105);
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%);
}
div{
margin-right: 30px;
}
.moon1{
margin-left:200px;
margin-top: -480px;
width: 8em;
height: 8em;
border-radius: 50%;
background-color: white;
box-shadow: 0 0 20px white;
animation: move 3s linear infinite;
}
@keyframes move {
0%{
width:8em;
height:8em;
}
50%{
width:10em;
height:10em;
}
100%{
width: 8em;
height: 8em;
}
}
.ya1{
width:500px;
height:500px;
overflow: hidden;
margin-top:20px ;
margin-left: 100px;
transform: rotateY(180deg);
}
span标签和section标签是关于流星运动的代码,
ya1是关于仙女的,moon1是关于月亮的。
仙女素材:ps应用不熟练,扣的有点丑,请诸位见谅
我们在中秋节的习俗之一就是吃月饼,就是吃月饼。
吃月饼的典故有何而来呢:
中秋节吃月饼相传始于元代。据说,当时,中原广大人民不堪忍受元朝统治阶级的残酷统治,纷纷起义抗元。朱元璋联合各路反抗力量准备起义。但朝庭官兵搜查的十分严密,传递消息十分困难。军师刘伯温便想出一计策,命令属下把藏有“八月十五夜起义”的纸条藏入饼子里面,再派人分头传送到各地起义军中,通知他们在八月十五日晚上起义响应。到了起义的那天,各路义军一齐响应。
很快,徐达就攻下元大都,起义成功了。消息传来,朱元璋高兴得连忙传下口谕,在即将来临的中秋节,让全体将士与民同乐,并将当年起兵时以秘密传递信息的“月饼”,作为节令糕点赏赐群臣。此后,“月饼”制作越发精细,品种更多。之后中秋节吃月饼的习俗便在民间流传开来。
我希望作为华夏子孙的我们,虽未经历过历史,但也不能不知历史,也不能忘了历史,中华文化源远流长,时至今日,我们竟不得不用放假来衡量节日。以史为镜,以史明志,知史方能成事!!
最后,希望大家中秋节可以开心快乐,阖家团圆,平平安安♥