Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>rotating planet</title>
    <link type="text/css" rel="stylesheet" href="planet.css">
</head>
    
<body>
    
<div class="stage">
<svg width="586px" height="591px" viewBox="0 0 586 591" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>rotating planets</title>
    <desc>Created with Sketch.</desc>
    
    <!--graphic define-->
    <defs>
        <!--centered planet gradient-->
        <linearGradient x1="24.7631836%" y1="-6.22680664%" x2="35.637207%" y2="139.633789%" id="linearGradient-2">
            <stop stop-color="#9EFDF1" offset="0%"></stop>
            <stop stop-color="#C4EEFC" offset="49.8094129%"></stop>
            <stop stop-color="#A2D7FB" offset="100%"></stop>
        </linearGradient>
        
        <!--circles-->
        <!-- inner halo1-->
        <circle class="halo" id="path-3" cx="293.5" cy="295.5" r="196.5"></circle>
        <filter x="-3.4%" y="-2.7%" width="106.9%" height="106.9%" filterUnits="objectBoundingBox" id="filter-4">
            <feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
            <feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="3" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.271252185 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        
        <!-- inner halo2-->
        <circle class="halo" id="path-5" cx="293" cy="295" r="232"></circle>
        <filter x="-2.9%" y="-2.3%" width="105.8%" height="105.8%" filterUnits="objectBoundingBox" id="filter-6">
            <feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
            <feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="3" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.271252185 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
         
        <!-- inner halo3-->
        <circle class="halo" id="path-7" cx="293" cy="295" r="278"></circle>
        <filter x="-2.4%" y="-1.9%" width="104.9%" height="104.9%" filterUnits="objectBoundingBox" id="filter-8">
            <feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
            <feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="3" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.271252185 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        
        <!--centered planet-->
        <circle class="main" id="path-9" cx="293" cy="295" r="160"></circle>
        <filter x="-4.2%" y="-3.3%" width="108.4%" height="108.4%" filterUnits="objectBoundingBox" id="filter-10">
            <feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
            <feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="3" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.271252185 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        
        <!--blue ball-->
        <linearGradient class="planet" x1="8.98339779%" y1="0.631216663%" x2="33.4274196%" y2="111.617744%" id="linearGradient-11">
            <stop stop-color="#2BC0E4" offset="0%"></stop>
            <stop stop-color="#085078" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" class="planet" id="path-12" cx="481.5" cy="400.5" r="36.5"></circle>
        <filter class="planet" x="-25.9%" y="-18.5%" width="151.9%" height="151.9%" filterUnits="objectBoundingBox" id="filter-13">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        <!--black ball-->
        <linearGradient class="planet" x1="33.4274196%" y1="-44.0441077%" x2="33.4274196%" y2="111.617744%" id="linearGradient-14">
            <stop stop-color="#354C76" offset="0%"></stop>
            <stop stop-color="#41577D" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" class="planet" id="path-15" cx="260.5" cy="95.5" r="26.5"></circle>
        <filter class="planet" x="-25.9%" y="-18.5%" width="151.9%" height="151.9%" filterUnits="objectBoundingBox" id="filter-16">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        <!--white ball-->
        <linearGradient class="planet" x1="7.16872016%" y1="-8.82019823%" x2="121.585648%" y2="100%" id="linearGradient-17">
            <stop stop-color="#F9E6C5" offset="0%"></stop>
            <stop stop-color="#FFFFFF" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" class="planet" id="path-18" cx="364.5" cy="35.5" r="19.5"></circle>
        <filter class="planet" x="-20.0%" y="-14.3%" width="140.0%" height="140.0%" filterUnits="objectBoundingBox" id="filter-19">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        <!--red ball--> 
        <linearGradient class="planet" x1="100%" y1="-116.863839%" x2="14.4196429%" y2="100%" id="linearGradient-20">
            <stop stop-color="#F4BAB3" offset="0%"></stop>
            <stop stop-color="#FFBEAF" offset="64.898692%"></stop>
            <stop stop-color="#FFECE6" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" class="planet"id="path-21" cx="49.5" cy="187.5" r="17.5"></circle>
        <filter class="planet"  x="-20.0%" y="-14.3%" width="140.0%" height="140.0%" filterUnits="objectBoundingBox" id="filter-22">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        <!--yellow ball--> 
        <linearGradient class="planet" x1="0%" y1="18.9380787%" x2="110.398628%" y2="117.862042%" id="linearGradient-23">
            <stop stop-color="#FADC7B" offset="0%"></stop>
            <stop stop-color="#FBF178" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" id="path-24" cx="200.5" cy="506.5" r="47.5"></circle>
        <filter class="planet" x="-16.3%" y="-11.6%" width="132.6%" height="132.6%" filterUnits="objectBoundingBox" id="filter-25">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
        <!--light purple ball--> 
        <linearGradient class="planet" x1="63.8626453%" y1="29.6693314%" x2="20.1126453%" y2="137.281977%" id="linearGradient-26">
            <stop stop-color="#DAE2F8" offset="0%"></stop>
            <stop stop-color="#D6A4A4" offset="100%"></stop>
        </linearGradient>
        <circle class="planet" id="path-27" cx="564.5" cy="250.5" r="11.5"></circle>
        <filter class="planet" x="-16.3%" y="-11.6%" width="132.6%" height="132.6%" filterUnits="objectBoundingBox" id="filter-28">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
        </filter>
    </defs>
      
    <!--assign graphics-->
    <g id="rotating-planets" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <rect id="Rectangle" fill="url(#radialGradient-1)" x="0" y="0" width="586" height="591"></rect>
        <!--halo 1-->
        <g class="lightsh" opacity="0.210425967">
            <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
            <use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-3"></use>
        </g>
        <!--halo 2-->
        <g class="lightsh" opacity="0.210425967">
            <use fill="black" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"></use>
            <use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-5"></use>
        </g>
        <!--halo 3-->
        <g class="lightsh"  opacity="0.210425967">
            <use fill="black" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"></use>
            <use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-7"></use>
        </g>
       
        <!--centered planet-->
        <g id="planetsh">
            <use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
            <use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-9"></use>
        </g>
             
        <!--blue-->
        <g class="circlesh" id="blue">
            <use fill="black" fill-opacity="1" filter="url(#filter-13)" xlink:href="#path-12"></use>
            <use fill="url(#linearGradient-11)" fill-rule="evenodd" xlink:href="#path-12"></use>
        </g>
        <!--dark-->
        <g class="circlesh" id="Oval-Copy-4">
            <use fill="black" fill-opacity="1" filter="url(#filter-16)" xlink:href="#path-15"></use>
            <use fill="url(#linearGradient-14)" fill-rule="evenodd" xlink:href="#path-15"></use>
        </g>
        <!--white-->
        <g class="circlesh" id="white">
            <use fill="black" fill-opacity="1" filter="url(#filter-19)" xlink:href="#path-18"></use>
            <use fill="url(#linearGradient-17)" fill-rule="evenodd" xlink:href="#path-18"></use>
        </g>
        <!--red-->
        <g class="circlesh" id="red">
            <use fill="black" fill-opacity="1" filter="url(#filter-22)" xlink:href="#path-21"></use>
            <use fill="url(#linearGradient-20)" fill-rule="evenodd" xlink:href="#path-21"></use>
        </g>
        <!--yellow-->
        <g class="circlesh" id="yellow">
            <use fill="black" fill-opacity="1" filter="url(#filter-25)" xlink:href="#path-24"></use>
            <use fill="url(#linearGradient-23)" fill-rule="evenodd" xlink:href="#path-24"></use>
        </g>
        <!--purple-->
        <g class="circlesh" id="Oval-Copy-3">
            <use fill="black" fill-opacity="1" filter="url(#filter-28)" xlink:href="#path-27"></use>
            <use fill="url(#linearGradient-26)" fill-rule="evenodd" xlink:href="#path-27"></use>
        </g>
            
    </g>
</svg> 
  </div>  
    
</body> 
</html>
              
            
!

CSS

              
                .stage {
    align-items: center;
    background: rgb(9,21,44);
background: radial-gradient(circle, rgba(9,21,44,1) 27%, rgba(14,61,140,1) 100%);
    display: flex;
    height: 100vh;
    justify-content: center;
    overflow-y: hidden;
    width: 800px;
}


.halo {
    animation: 4s halo-anim .4s ease-in-out infinite;
    display: block;
    position: absolute;
    transform-origin: center center;
}

@keyframes halo-anim {
    50% {
        transform: scale(1.05);
    }
}


/*planet rotating*/
.circlesh{
   animation: halo-star-anim linear 9s forwards infinite;
    border-radius: 60%;
    display: block;
    position: absolute;
    transform-origin: center center;
}

@keyframes halo-star-anim {
    100% {
        transform: rotateZ(-360deg);
    }
}


              
            
!

JS

              
                
              
            
!
999px

Console