div+css模拟月球阴晴圆缺动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css模拟月球阴晴圆缺动画效果代码,从月牙到满月过程动画。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html {
height: 100%;
font-size: 1vw;
}
body {
height: 100%;
background-color: #020202;
overflow: hidden;
text-align: center;
}
.container {
position: relative;
top: 50%;
transform: translateY(-50%);
}
.moon {
display: inline-block;
width: 19rem;
height: 19rem;
border-radius: 50%;
overflow: hidden;
margin: 0 0.25rem;
transform: rotate(-0.1turn);
}
.moon:first-of-type .light {
animation-delay: -2.5s;
}
.moon:nth-child(3) .light {
animation-delay: -17.5s;
}
.light {
box-sizing: border-box;
width: 20rem;
height: 20rem;
background-color: #111;
border-radius: 50%;
animation: cycle 20s linear infinite reverse;
animation-delay: -10s;
filter: blur(0.5rem);
}
.texture {
width: 19rem;
height: 19rem;
border-radius: 50%;
position: absolute;
margin-top: -20rem;
/*background-image: url(https://www.nasa.gov/sites/default/files/thumbnails/image/moon_3.jpg);
background-position: center center;*/
backgroun.........完整代码请登录后点击上方下载按钮下载查看
网友评论0