Handcrafted Crystal Healing Jewelry
/* 容器设置,确保流星只在当前区域显示 */
.elementor-section {
position: relative;
overflow: hidden; /* 防止流星划出屏幕出现滚动条 */
}
.night-sky {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none; /* 确保鼠标可以点击到背景之上的按钮 */
z-index: 1; /* 图层层级 */
}
.star {
position: absolute;
top: 50%;
left: 50%;
width: 4px;
height: 4px;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(255,255,255,0.1), 0 0 0 8px rgba(255,255,255,0.1), 0 0 20px rgba(255,255,255,1);
animation: meteor 3s linear infinite;
opacity: 0;
}
.star::before {
content: ”;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 300px;
height: 1px;
background: linear-gradient(90deg, #fff, transparent);
}
/* 定义流星划过的动画 */
@keyframes meteor {
0% {
transform: rotate(-45deg) translateX(0);
opacity: 1;
}
70% {
opacity: 1;
}
100% {
transform: rotate(-45deg) translateX(-1000px); /* 流星移动的距离 */
opacity: 0;
}
}
/* 设置每颗流星的不同位置和延迟,制造随机感 */
.star:nth-child(1) { top: 0; right: 0; animation-delay: 0s; animation-duration: 3s; }
.star:nth-child(2) { top: 20%; right: 10%; animation-delay: 1s; animation-duration: 4s; }
.star:nth-child(3) { top: 40%; right: 20%; animation-delay: 2s; animation-duration: 3s; }
.star:nth-child(4) { top: 60%; right: 5%; animation-delay: 1.5s; animation-duration: 2.5s; }
.star:nth-child(5) { top: 10%; right: 40%; animation-delay: 3s; animation-duration: 3.5s; }
Showing 1–9 of 23 resultsSorted by latest










