JSFiddle - React, Tailwind, and code Playground
by Nathan Piper
HTML
<body>
<title>
Alone in the space
</title>
<img id="sun" src="http://goo.gl/dEEssP">
<div id='earth-orbit'>
<a href= <img id="earth" src="http://www.clker.com/cliparts/b/a/P/3/L/8/earth-cartoon-md.png">
<img id="moon" src="http://tinyurl.com/kxs7dxg">
</div>
</body>
CSS
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: 25%;
left: 25%;
height: 50px;
width: 50px;
margin-left: -25px;
margin-top: -25px;
border-width: 2px;
border-style: solid;
border-radius: 25%;
box-shadow: 0 0 64px blue;
#moon {
position: absolute;
top: 24%;
left: 24%
height: 25px;
width: 25px;
margin-left: -25;
margin-top: -25px;
border-width: 2px;
border-style: solid;
border-radius: 25%
box-shadow:0 0 64px grey;
}
}
#earth-orbit {
position: absolute;
top: 50%;
left: 50%;
height: 25px;
width: 25px;
width: 500px;
height: 500px;
margin-top: -250px;
margin-left: -250px;
border-width: 2px;
border-style: dotted;
border-color: black;
border-radius: 50%;
-webkit-animation: spin-right 10s linear infinite;
animation: spin right 10s linear infinite;
}
@-webkit-keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
}
}