This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Sun, Earth, and Code Forum

View Course

116 points
Dd35e61b0761e2cfdf8ec1c79693002f?s=140&d=retro
Submitted by
ZoBoe
about 2 years ago

6/7 why is my orbit a square?

this is my code
html, body {

width: 100%;
height: 100%;


background-color: black;

}

#sun {
position: absolute;

top: 50%;
left: 50%;

 border-color: orange;

border-width: 2px;
border-style: solid;
border-radius: 50%;
box-shadow: 0 0 64px yellow;

height: 200px;
width: 200px;
margin-top: -100px; 
margin-left: -100px;

}

#earth {
position: absolute;
top: 0%;
left: 50%;

    height: 50px;
    width: 50px;
    margin-left: -25px;
    margin-top: -25px

}

#earth-orbit {
position: absolute;
top: 50%;
left: 50%;

width: 500px;
height: 500px;
margin-top: -250px;
margin-left: -250px;

border-width: 2px;
border-style: dotted;
border-color: white;
border-radius: 50%

 -webkit-animation: spin-right 10s linear infinite;
 -moz-animation: spin-right 10s linear infinite;
  -ms-animation: spin-right 10s linear infinite;
   -o-animation: spin-right 10s linear infinite;
      animation: spin-right 10s linear infinite;

}
@-webkit-keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}

@keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}


0 votes

permalink

i have the same problem

281 points
2b45546897bc11bb1e505bfa5c82be54?s=140&d=retro
Submitted by
Hadde
about 2 years ago