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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="container">

  <div class="translate-general">
    <h1>Translate()</h1>
    <p>Two Fellows were travelling together through a wood, when a Bear rushed out upon them. One of the travellers happened to be in front, and he seized hold of the branch of a tree, and hid himself among the leaves.</p>
  </div>

  <div class="translate-x">
    <h1>TranslateX()</h1>
    <p>An Eagle was soaring through the air when suddenly it heard the whizz of an Arrow, and felt itself wounded to death. Slowly it fluttered down to the earth, with its life-blood pouring out of it.</p>
  </div>

  <div class="translate-y">
    <h1>TranslateY()</h1>
    <p>A Giant Oak stood near a brook in which grew some slender Reeds. When the wind blew, the great Oak stood proudly upright with its hundred arms uplifted to the sky. But the Reeds bowed low in the wind and sang a sad and mournful song.</p>
  </div>

</div>
              
            
!

CSS

              
                /* General Styling */

@import url(https://fonts.googleapis.com/css?family=Raleway|Sorts+Mill+Goudy);

p {
  font-family: 'Raleway', serif;
  font-size: 0.9em;
  line-height: 1.4em;
}

h1 {
  font-family: 'Sorts Mill Goudy', serif;
  font-size: 1.4em;
  color: #e8e3b3;
}

.container {
  width: 50%;
  margin-left: 25%;
  margin-right: 25%;
}

/* Translate */

.translate-general {
  background-color: #474142;
  color: #afaaac;
  width: 250px;
  padding: 20px;
  margin: 0 auto;
  margin-bottom: 20px;
  transition: all 0.5s ease-in-out;
}

.translate-general:hover {
  transform: translate(50px,80px);
}

/* TranslateX */

.translate-x {
  background-color: #474142;
  color: #afaaac;
  width: 250px;
  padding: 20px;
  margin: 0 auto;
  margin-bottom: 20px;
   transition: all 0.5s ease-in-out;
}

.translate-x:hover {
  transform: translateX(80px);
}

/* TranslateY */

.translate-y {
 background-color: #474142;
  color: #afaaac;
  width: 250px;
  padding: 20px;
  margin: 0 auto;
  margin-bottom: 20px;
  transition: all 0.5s ease-in-out;
}

.translate-y:hover {
  transform: translateY(15%);
}
              
            
!

JS

              
                
              
            
!
999px

Console