Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <body>
  <h1 class="msg">..shhh.. ..houston... ..404... ..shhhh... ..lost.. ..in.. ..space. .shhhhh...</h1>
  <div class="astro-wrap">
    <a class="astronaut" href="#" title="return to base"></a>
  </div>
</body>
              
            
!

CSS

              
                body
    width: 100%
    height: 100% 
    background: #fff
    font-size: 16px
    line-height: 25px
    font-weight: normal
    background: url(https://i.imgur.com/bsqWdBi.jpg)

.msg
    color: #fff
    text-align: center
    animation: flicker 2s ease infinite


.astro-wrap
    width: 265px
    height: 430px
    margin: 0 auto
    position: relative

.astronaut
    background: url(https://i.imgur.com/VurcHkh.png)
    width: 265px
    height: 429px
    position: absolute
    top: 0
    left: 0
    transform: translate(0,50px)
    animation: move 10s infinite

@keyframes move
    0%    
        transform: translate(0,50px)
    50% 
        transform: translate(20px,100px)
    100% 
        transform: translate(0,50px)
      
@keyframes blink
    0%    
        top: 50px
        left: 0px
    50%    
        top: 100px
        left: 20px
    100%    
        top: 50px
        left: 0px

@keyframes flicker
    0%     
        opacity: 0.9
    30%     
        opacity: 0.97
    40%     
        opacity: 1
    80%     
        opacity: 0.9
    88%     
        opacity: 0.98
    90%     
        opacity: 0.94
    93%     
        opacity: 0.9
    95%     
        opacity: 0.99    
    96%     
        opacity: 0.93
    98%     
        opacity: 1
    99%     
        opacity: 0.93
        

@media only screen and (max-width: 570px)
    .msg
        position: absolut

@media only screen and (min-width: 1900px)
    body
        background-size: cover

              
            
!

JS

              
                
              
            
!
999px

Console