<style>
body{
width: 100%;
height: 100vh;
margin: 0;
padding: 0;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background-color: black;
}
.container{
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.sun{
position: absolute;
width: 200px;
height: 200px;
background-color: yellow;
border-radius: 50%;
box-shadow: 0 0 5rem #fff, 0 0 5rem #fff;
}
.earth{
position: absolute;
width: 500px;
height: 500px;
/* background-color: aqua; */
border-radius: 50%;
border-style: solid solid none none;
border-color: silver transparent transparent transparent;
border-width: 0.1rem;
animation: move 36.5s linear infinite;
}
.earth::before{
content: '';
width: 50px;
height: 50px;
background-color: blue;
position: absolute;
top: 50px;
right: 50px;
border-radius: 50%;
}
.moon{
position: absolute;
width: 120px;
height: 120px;
top: 12px;
right: 12px;
/* background-color: aqua; */
border-radius: 50%;
border-style: solid solid none none;
border-color: silver transparent transparent transparent;
border-width: 0.1rem;
animation: move 24s linear infinite;
}
.moon::before{
content: '';
width: 30px;
height: 30px;
background-color: rgb(48, 48, 51);
position: absolute;
top: 0px;
right: 0px;
border-radius: 50%;
}
@keyframes move{
to{
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="container">
<div class="sun"></div>
<div class="earth">
<div class="moon"></div>
</div>
</div>
</body>
</html>