css实现水中月倒影代码
代码语言:html
所属分类:布局界面
代码描述:css实现水中月倒影代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(
180deg,
#0c1445 0%,
#1a1f4a 30%,
#2d3561 60%,
#1e2347 100%
);
min-height: 100vh;
font-family: "Arial", sans-serif;
overflow: hidden;
position: relative;
}
/* Stars in the sky */
.stars {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 50%;
background: transparent;
}
.star {
position: absolute;
background: white;
border-radius: 50%;
animation: twinkle 3s ease-in-out infinite alternate;
}
.star:nth-child(1) {
width: 2px;
height: 2px;
top: 10%;
left: 15%;
animation-delay: 0s;
}
.star:nth-child(2) {
width: 1px;
height: 1px;
top: 15%;
left: 30%;
animation-delay: 1s;
}
.star:nth-child(3) {
width: 3px;
height: 3px;
top: 8%;
left: 70%;
animation-delay: 2s;
}
.star:nth-child(4) {
width: 1px;
height: 1px;
top: 20%;
left: 80%;
animation-delay: 0.5s;
}
.star:nth-child(5) {
width: 2px;
height: 2px;
top: 12%;
left: 90%;
animation-delay: 1.5s;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0