css布局实现全月和流星效果

代码语言:html

所属分类:布局界面

代码描述:css布局实现全月和流星效果

代码标签: 全月 流星 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,700">
<style>
/* Utils */
/* Style */
body {
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Roboto, sans-serif;
}

.container {
  width: 500px;
  height: 500px;
  position: relative;
  border-radius: 50%;
  background-color: #251f31;
  overflow: hidden;
  z-index: -100;
  border: 20px solid white;
  box-shadow: 0 8px 20px rgba(74, 40, 126, 0.2);
}
.container *,
.container *:before,
.container *:after {
  position: absolute;
  box-sizing: border-box;
}

.moon {
  width: 250px;
  height: 250px;
  z-index: 4;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  background-color: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.moon .carter {
  width: 70px;
  height: 70px;
  background-color: #f0f0e3;
  border-radius: 50%;
  left: 60%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.moon .carter.second {
  width: 27px;
  height: 27px;
  left: 84%;
  top: 55%;
  z-index: 2;
}
.moon .carter.third {
  width: 40px;
  height: 40px;
  left: 65%;
  top: 75%;
  z-index: 1;
}
.moon .moon-halo:after, .moon .moon-halo:before {
  content: '';
  display: inline-block;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0