cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              svg#earth(version='1.1', xmlns='http://www.w3.org/2000/svg', xmlns:xlink='http://www.w3.org/1999/xlink', x='0px', y='0px', viewbox='0 0 504.1 504.1', style='enable-background:new 0 0 504.1 504.1;', xml:space='preserve')
  path.st0(d='M396.2 389.4c-3.2-5.5-10.6-7.5-16.1-4.3-101.2 58.3-230.8 24-289.1-76C33.1 209.1 68.1 80.3 169.4 22c5.5-3.2 7.5-10.6 4.3-16.1s-10.6-7.5-16.1-4.3c-112.6 65-151.6 208.3-87 319.4 40.2 69.3 110.7 109.9 185.5 115.4v32.3h-45.3c-9.8 0-17.7 7.9-17.7 17.7 0 9.8 7.9 17.7 17.7 17.7h114.2c9.8 0 17.7-7.9 17.7-17.7 0-9.8-7.9-17.7-17.7-17.7h-48.4 3.2v-31.5c38.2-.8 76.8-11 112.2-31.5C397.4 402 399.4 395 396.2 389.4z')
  g#earth_shape
    path.st1(d='M275.7 15.7c104.4 0 189 84.7 189 189s-84.7 189-189 189-189-84.7-189-189S171.3 15.7 275.7 15.7z')
    path.st2(d='M416.7 330.8c13-50.4 24.8-123.3-12.6-115-35.8 7.9-80.3 16.5-101.6 19.7s-46.9-18.1-75.6-33.5c-3.9-16.1-4.3-24.8 18.1-41.4 22.8-16.9 33.5 16.1 42.5 6.3 15-18.1 4.7-35.1 24-74.4 19.3-38.6 21.3-32.7 35.1-63-21.7-8.7-45.7-13.8-70.9-13.8-73.3 0-136.7 41.7-168.2 102.4 5.1 10.6 12.2 21.7 22.1 33.9 30.3 36.6 62.2 51.6 112.2 82.3 50 30.3 42.5 44.1 30.3 57.9-12.2 13.8-31.1 72.9 4.7 91.4l16.1 9.8C341.9 388.7 385.6 365.4 416.7 330.8z')
    path.st3(d='M303.3 366.2c-104.4 0-189-84.7-189-189 0-45.3 15.8-86.6 42.1-119.3-42.5 35.1-69.7 87.8-69.7 146.9 0 104.4 84.7 189 189 189 59.1 0 112.2-27.2 146.9-69.7C389.9 350.5 348.6 366.2 303.3 366.2z')
    path.st4(d='M417.1 328c-31.5 24-70.9 38.2-113.8 38.2-15.4 0-30.3-2-44.5-5.5 2.8 9.5 8.7 17.3 18.1 22.4 6.3 3.9 11.4 7.1 16.1 9.8h1.2l6.7-.8 2.8-.4 6.7-1.2 2.4-.4c7.5-1.6 15-3.5 22.1-5.9l2.4-.8c2-.8 3.9-1.2 5.5-2l3.5-1.2 5.1-2.4c1.2-.4 2.4-1.2 3.9-1.6l4.7-2.4 3.9-2 4.3-2.4 4.7-2.8c1.6-.8 2.8-1.6 4.3-2.8 2.4-1.6 4.3-3.2 6.7-4.3l3.2-2.4 4.7-3.5 3.2-2.4c1.6-1.2 3.2-2.4 4.3-3.5.8-.8 2-1.6 2.8-2.8l4.3-3.9c.8-.8 1.6-1.6 2.8-2.4l4.7-4.7 2-2 .4-.4C416.7 330 417.1 328.8 417.1 328L417.1 328zM118.5 137c6.3-29.1 19.7-55.9 37.8-78.8l-.4.4c-2.4 2-4.3 3.5-6.3 5.5l-2 2c-1.6 1.6-3.5 3.2-5.1 5.1l-2.4 2.4-4.7 4.7c-.8.8-1.6 1.6-2.4 2.8l-4.7 5.9c-.8.8-1.6 2-2.4 3.2l-3.2 3.9-3.2 4.3-3.2 4.7c-.8 1.2-1.6 2.4-2.4 3.9l-2.4 3.5-3.5 6.3-1.2 2C110.7 124.4 114.2 130.3 118.5 137z')
iframe.yframe(width='420', height='315', src='https://www.youtube.com/embed/2O1-XNwNq70?autoplay=1&cc_load_policy=1', frameborder='0', allowfullscreen='')
svg#sun(version='1.1', xmlns='http://www.w3.org/2000/svg', xmlns:xlink='http://www.w3.org/1999/xlink', x='0px', y='0px', viewbox='0 0 454 246', style='enable-background:new 0 0 454 246;', xml:space='preserve')
  g
    g#thesun
      circle.a0(cx='167.8', cy='79.9', r='53')
      path.a1(d='M167.8 26.9c-29.3 0-53 23.7-53 53 0 29.3 23.7 53 53 53V26.9z')
    g#cloud1
      path.a2(d='M395.5 87.2h-74c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h74c13.3 0 24.1-10.8 24.1-24.1C419.6 98 408.8 87.2 395.5 87.2z')
      path.a3(d='M321.5 87.2c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h37V87.2L321.5 87.2 321.5 87.2z')
  g#cloud2
    path.a2(d='M265.5 147.2h-74c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h74c13.3 0 24.1-10.8 24.1-24.1C289.6 158 278.8 147.2 265.5 147.2z')
    path.a3(d='M191.5 147.2c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h37v-48.3L191.5 147.2 191.5 147.2z')
  g#cloud3
    path.a2(d='M114.5 127.2h-74c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h74c13.3 0 24.1-10.8 24.1-24.1C138.6 138 127.8 127.2 114.5 127.2z')
    path.a3(d='M40.5 127.2c-13.3 0-24.1 10.8-24.1 24.1 0 13.3 10.8 24.1 24.1 24.1h37v-48.3L40.5 127.2 40.5 127.2z')

            
          
!
            
              body
    background #00d2ff
    background -webkit-linear-gradient(to left, #00d2ff , #3a7bd5)
    background linear-gradient(to left, #00d2ff , #3a7bd5)

.yframe
    opacity 0

#earth
    width 300px
    margin 0 auto
    position absolute
    top 280px
    left 0
    right 0

.st0
    fill #324D5B

.st1
    fill #26A6D1

.st2
    fill #AEC225

.st3
    fill #2295BC

.st4
    fill #9CAE21

#sun
    width 300px
    margin 0 auto
    position absolute
    top 200px
    left 0
    right 0

.a0
    fill #FEDD3D

.a1
    opacity 0.3
    fill #FF9500

.a2
    fill #E7ECF2

.a3
    opacity 0.98
    fill #F9F9F9
            
          
!
            
              var earth = document.getElementById('earth_shape'),
    sun = document.getElementById('thesun'),
    c1 = document.getElementById('cloud1'),
    c2 = document.getElementById('cloud2'),
    c3 = document.getElementById('cloud3'),
    tl = new TimelineMax(),
    tl2 = new TimelineMax({repeat:-1, yoyo: true}),
    tl3 = new TimelineMax({repeat:-1, yoyo: true});

    tl
       .from(earth, 3, {rotation: 360,
                        transformOrigin:"center",
                        ease: Power0.easeNone,  
                        repeat:-1});
     tl2
        .to(sun, 3, {x: 100, 
                     y: 15,        
                     ease: Power0.easeNone
                    })
        .to(sun, 3, {x: 200, 
                     y: 70,                
                     ease: Power0.easeNone});
     tl3
        .to(c1, 4, {x: 20, 
                     y: 35,        
                     ease: Power0.easeNone
                    })
        .to(c2, 4, {x: -20, 
                     y: 30,                
                     ease: Power0.easeNone},0)
        .to(c3, 4, {x: 40, 
                     y: -10,                
                     ease: Power0.easeNone},0);
      

 
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console