Enjoy Live Rotation of Earth, Revolution of the Earth and Twinkling Stars

Ticker

10/recent/ticker-posts

Enjoy Live Rotation of Earth, Revolution of the Earth and Twinkling Stars

Maa Blogger Creation of the Earth 🌍 Rotation, Revolution & Moon 🌚 Rotation, Stars 🌟🌟 Twinkling By This Source Code


HTML 

<!DOCTYPE html>

<html lang="en" >

<head>

  <meta charset="UTF-8">

  <title>Orbiting Planet Animation</title>

  <link rel="stylesheet" href="./style.css">


</head>

<body>

<html>

<head>

    <title>Orbiting Planet Animation</title>

    <link rel="stylesheet" type="text/css" href="Stylesheet.css">

        <link rel="stylesheet" type="text/css" href="https://necolas.github.io/normalize.css/7.0.0/normalize.css">

    <script src="https://raw.githubusercontent.com/aFarkas/html5shiv/master/src/html5shiv.js"></script>   

    </head>

    <body id="Universe">

<div id="Stars"></div>

        <div id="Sun"></div>

        <div id="EarthOrbit">

            <img id="Earth" src="https://media.giphy.com/media/3og0INnNodRPRBagJW/giphy.gif" alt="Rotating Earth">

                <div id="MoonOrbit">

                    <div id="Moon"></div>

                    </div>

            </div>

    </body>

</html>

</body>

</html>


CSS 


@charset "utf-8";

html, body {
height: 100%;
width: 100%;
}

#Universe {
background: url(https://wallpaperaccess.com/full/17495.jpg);
background: radial-gradient(#555, #000);
}

#Stars {
position: relative;
z-index: 4;
background: url(https://wallpaperaccess.com/full/17495.jpg) no-repeat fixed;
height: 100%;
width: 100%;
-webkit-animation: StarPulse 3s infinite alternate;
        animation: StarPulse 3s infinite alternate;
}

#Sun {
height: 300px;
width: 300px;
background: radial-gradient(#F5f11f, #E07f08);
position: absolute;
z-index: 4;
-webkit-box-shadow: 0 0 70px #F5f91A;
        box-shadow: 0 0 70px #F5f91A;
top: 50%;
left: 50%;
border-radius: 100%;
margin-top: -100px;
margin-left: -100px;
-webkit-animation: SunFire 3s infinite alternate;
        animation: SunFire 3s infinite alternate;  
}

#EarthOrbit {
border: none;
height: 700px;
width: 650px;
position: absolute;
z-index: 4;
top: 50%;
left: 50%;
margin-top: -350px;
margin-left: -275px;
border-radius: 100%;
-webkit-animation: Rotation 20s linear infinite;
        animation: Rotation 20s linear infinite;
}

#Earth {
position: absolute;
top: 50%;
left: 0;
height: 95px;
width: 95px;
margin-top: -40px;
-webkit-animation: Rotation 5s linear infinite;
        animation: Rotation 5s linear infinite;
}

#MoonOrbit {
border: none;
height: 130px;
width: 130px;
position: absolute;
z-index: 4;
top: 50%;
left: -20px;
margin-top: -60px;
border-radius: 100%;
-webkit-animation: Rotation 5s linear infinite reverse;
        animation: Rotation 5s linear infinite reverse;
}

#Moon {
height: 30px;
width: 30px;
background: radial-gradient(#fff, #999);
border-radius: 100%;
}

@-webkit-keyframes StarPulse {
from {opacity: 1.5}
to {opacity: 0.2}
}

@keyframes StarPulse {
from {opacity: 1.5}
to {opacity: 0.2}
}

@-webkit-keyframes SunFire {
from {-webkit-box-shadow: 0 0 70px #F5C91A;box-shadow: 0 0 70px #F5C91A;}
to {-webkit-box-shadow: 0 0 100px #F5C91A;box-shadow: 0 0 100px #F5C91A;}
}

@keyframes SunFire {
from {-webkit-box-shadow: 0 0 70px #F5C91A;box-shadow: 0 0 70px #F5C91A;}
to {-webkit-box-shadow: 0 0 100px #F5C91A;box-shadow: 0 0 100px #F5C91A;}
}

@-webkit-keyframes Rotation {
from {-webkit-transform: rotate(0);transform: rotate(0);}
to {-webkit-transform: rotate(360deg);transform: rotate(360deg);}
}

@keyframes Rotation {
from {-webkit-transform: rotate(0);transform: rotate(0);}
to {-webkit-transform: rotate(360deg);transform: rotate(360deg);}
}


Orbiting Planet Output Screen





Post a Comment

37 Comments

  1. Superb quality and excellent work

    ReplyDelete