Tell us what’s happening:
i dont know where the problem is, is only the stylesheet i got right but all my css are failed kindly look at it for me
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Moon Orbit</title>
</head>
<body>
<div class="space"> <div class="earth"></div>
<div class="orbit">
<div class="moon"></div>
</div>
</div>
</body>
</html>
/* file: styles.css */
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.space {
width: 200px;
height: 200px;
position: relative;
}
.earth {
width: 100px;
height: 100px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: blue;
border-radius: 50%;
}
.orbit {
width: 200px;
height: 200px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: orbit 5s linear infinite;
}
.moon {
width: 30px;
height: 30px;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
background-color: gray;
border-radius: 50%;
}
@keyframes orbit {
0% {
transform: rotate(0deg) translate(-50%, -50%);
}
100% {
transform: rotate(360deg) translate(-50%, -50%);
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Build a Moon Orbit - Build a Moon Orbit