<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS3 彩色星球运转</title>
<style>
body {
background: black;
}
span {
display: block;
}
.orbit {
height: 20em;
width: 20em;
margin: 5em 10em;
position: relative;
}
.planet {
height: 20em;
width: 20em;
background-color: blue;
border-radius: 50%;
z-index: 4;
position: absolute;
left: 0;
top: 0;
background-image: linear-gradient(225deg, rgba(255, 255, 255, 0.5) 0%, rgba(100, 100, 255, 0.3) 50%, rgba(100, 100, 255, 0.7) 100%), linear-gradient(26deg, #1e5799 0%, #2989d8 22%, #236cba 44%, #2989d8 56%, #2a67e0 66%, #207cca 76%, #7db9e8 100%);
}
.planet:before {
content: "";
dipslay: block;
position: absolute;
height: 2em;
width: 3em;
background-color: red;
top: 71%;
right: 30%;
border-radius: 50%;
transform: rotate(24deg);
box-shadow: -4px 0 8px rgba(70, 70, 155, .2), 4px 0 8px rgba(70, 70, 155, .2);
/* FF3.6+ */
background: -moz-radial-gradient(center, ellipse cover, #7abcff 0%, rgba(122, 188, 255, 0.84) 17%, rgba(122, 188, 255, 0.76) 25%, rgba(96, 171, 248, 0.58) 44%, rgba(122, 188, 255, 0.48) 55%, rgba(122, 188, 255, 0.41) 62%, rgba(122, 188, 255, 0.34) 70%, rgba(64, 150, 238, 0.06) 100%);
/* Chrome,Safari4+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #7abcff), color-stop(17%, rgba(122, 188, 255, 0.84)), color-stop(25%, rgba(122, 188, 255, 0.76)), color-stop(44%, rgba(96, 171, 248, 0.58)), color-stop(55%, rgba(122, 188, 255, 0.48)), color-stop(62%, rgba(122, 188, 255, 0.41)), color-stop(70%, rgba(122, 188, 255, 0.34)), color-stop(100%, rgba(64, 150, 238, 0.06)));
/* Chrome10+,Safari5.1+ */
background: -webkit-radial-gradient(center, ellipse cover, #7abcff 0%, rgba(122, 188, 255, 0.84) 17%, rgba(122, 188, 255, 0.76) 25%, rgba(96, 171, 248, 0.58) 44%, rgba(122, 188, 255, 0.48) 55%, rgba(122, 188, 255, 0.41) 62%, rgba(122, 188, 255, 0.34) 70%, rgba(64, 150, 238, 0.06) 100%);
/* Opera 12+ */
background: -o-radial-gradient(center, ellipse cover, #7abcff 0%, rgba(122, 188, 255, 0.84) 17%, rgba(122, 188, 255, 0.76) 25%, rgba(96, 171, 248, 0.58) 44%, rgba(122, 188, 255, 0.48) 55%, rgba(122, 188, 255, 0.41) 62%, rgba(122, 188, 255, 0.34) 70%, rgba(64, 150, 238, 0.06) 100%);
/* IE10+ */
background: -ms-radial-gradient(center, ellipse cover, #7abcff 0%, rgba(122, 188, 255, 0.84) 17%, rgba(122, 188, 255, 0.76) 25%, rgba(96, 171, 248, 0.58) 44%, rgba(122, 188, 255, 0.48) 55%, rgba(122, 188, 255, 0.41) 62%, rgba(122, 188, 255, 0.34) 70%, rgba(64, 150, 238, 0.06) 100%);
background: radial-gradient(ellipse at center, #7abcff 0%, rgba(122, 188, 255, 0.84) 17%, rgba(122, 188, 255, 0.76) 25%, rgba(96, 171, 248, 0.58) 44%, rgba(122, 188, 255, 0.48) 55%, rgba(122, 188, 255, 0.41) 62%, rgba(122, 188, 255, 0.34) 70%, rgba(64, 150, 238, 0.06) 100%);
}
.moon {
height: 2em;
width: 2em;
/* ff3.6+ */
background: -moz-linear-gradient(213deg, #ffdf75 0%, #ffdf75 1%, #ab941f 100%);
/* safari4+,chrome */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #ab941f), color-stop(99%, #ffdf75), color-stop(100%, #ffdf75));
/* safari5.1+,chrome10+ */
background: -webkit-linear-gradient(213deg, #ffdf75 0%, #ffdf75 1%, #ab941f 100%);
/* opera 11.10+ */
background: -o-linear-gradient(213deg, #ffdf75 0%, #ffdf75 1%, #ab941f 100%);
/* ie10+ */
background: -ms-linear-gradient(213deg, #ffdf75 0%, #ffdf75 1%, #ab941f 100%);
background: linear-gradient(237deg, #ffdf75 0%, #ffdf75 1%, #ab941f 100%);
border-radius: 50%;
position: absolute;
top: 20%;
left: -20%;
-webkit-animation: orbit 7s ease-in-out 0s infinite;
animation: orbit 7s ease-in-out 0s infinite;
}
@-webkit-keyframes orbit {
0% {
top: 20%;
left: -20%;
z-index: 5;
}
50% {
top: 80%;
left: 120%;
}
100% {
top: 20%;
left: -20%;
z-index: 3;
}
}
@keyframes orbit {
0% {
top: 20%;
left: -20%;
z-index: 5;
}
50% {
top: 80%;
left: 120%;
}
100% {
top: 20%;
left: -20%;
z-index: 3;
}
}
.moon:after {
content: "";
display: none;
height: 3em;
width: 3em;
position: relative;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
border-radius: 50%;
margin-left: -4em;
margin-bottom: -2em;
-webkit-animation: moonshadow 7s ease-in-out 0s infinite;
animation: mooonshadow 7s ease-in-out 0s infinite;
}
@-webkit-keyframes moonshadow {
0% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, .1);
z-index: 5;
}
40% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, .1);
}
50% {
background-color: transparent;
box-shadow: 0 0 5px rgba(0, 0, 0, 0);
z-index: 3;
}
100% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0);
background-color: transparent;
z-index: 0;
}
}
@keyframes moonshadow {
0% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, .1);
z-index: 5;
}
40% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, .1);
}
50% {
background-color: transparent;
box-shadow: 0 0 5px rgba(0, 0, 0, 0);
z-index: 3;
}
100% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0);
background-color: transparent;
z-index: 0;
}
}
.moon2 {
height: 3em;
width: 3em;
border-radius: 50%;
border-radius: 50%;
position: absolute;
top: 20%;
left: -40%;
/* ff3.6+ */
background: -moz-linear-gradient(213deg, #ffb74a 0%, #ab4a32 100%);
/* safari4+,chrome */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #ab4a32), color-stop(100%, #ffb74a));
/* safari5.1+,chrome10+ */
background: -webkit-linear-gradient(213deg, #ffb74a 0%, #ab4a32 100%);
/* opera 11.10+ */
background: -o-linear-gradient(213deg, #ffb74a 0%, #ab4a32 100%);
/* ie10+ */
background: -ms-linear-gradient(213deg, #ffb74a 0%, #ab4a32 100%);
background: linear-gradient(237deg, #ffb74a 0%, #ab4a32 100%);
-webkit-animation: orbit2 11s ease-in-out 0s infinite;
animation: orbit2 11s ease-in-out 0s infinite;
}
@-webkit-keyframes orbit2 {
0% {
top: 20%;
left: -40%;
z-index: 6;
}
50% {
top: 80%;
left: 140%;
}
100% {
top: 20%;
left: -40%;
z-index: 1;
}
}
@keyframes orbit2 {
0% {
top: 20%;
left: -40%;
z-index: 6;
}
50% {
top: 80%;
left: 140%;
}
100% {
top: 20%;
left: -40%;
z-index: 1;
}
}
.moon2:after {
content: "";
display: none;
height: 5em;
width: 5em;
position: relative;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
border-radius: 50%;
margin-left: -6em;
margin-bottom: -2em;
-webkit-animation: moon2shadow 7s ease-in-out 0s infinite;
animation: moon2shadow 7s ease-in-out 0s infinite;
}
@-webkit-keyframes moon2shadow {
0% {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, .1);
z-index: 5;
}
40% {
box-shadow: 0