Pen Settings



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


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


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.


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.


                <div class="container">
  <div class="wrapper">
    <p>This is a fairly short sentence.</p>

<div class="container">
  <div class="wrapper">
    <p>This is a much longer short sentence to illustrate that they are moving at the same "rate".</p>


  white-space: nowrap;
  margin: 1em;
  overflow: hidden;
  background: #CCC;
.container p{
  margin: 0;
  padding: 0;
  display: inline-block;
  font-size: 200%;


                // Rate = Distance over Time r=d/t
// If we want to define the rate, and 
// the distance is determined, 
// time will have to be variable

// We want to define the rate, and we can 
// define that statically
r = 100;
adjustJank = 4; // Set this to 0 to see the jank I'm talking about ... this just adds to the distance animated to smooth out the seam

// Set up for what appears to be an seamless stream of text
$('.container p').each( function(){
  var obj = $(this);
  var d = obj.width();
  obj.clone().appendTo( obj.parent() ); 
  obj.parent().parent().width( d );
  // r = d/t 
  // r*t = d
  // t = d/r
  var t = d/r;
  $('button').click( function(){ 
        t,  // our calculated time
         x: "-"+(d+adjustJank), 
         ease: Linear.easeNone,
         repeat: -1,