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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="marquee">
  <div class="marquee--inner">
    <span>
      <div class="orb"></div><div class="orb red"></div><div class="orb yellow"></div><div class="orb blue"></div><div class="orb orange"></div><div class="orb purple"></div><div class="orb green"></div><div class="orb"></div>
    </span>
    <span>
      <div class="orb"></div><div class="orb red"></div><div class="orb yellow"></div><div class="orb blue"></div><div class="orb orange"></div><div class="orb purple"></div><div class="orb green"></div><div class="orb"></div>
    </span>

  </div>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
  font-size: 42px;
  font-family: sans-serif;
  color: #333;
  overflow: hidden;
}

.orb {
  width: 50px;
  height: 50px;
  background: #999;
  border-radius: 50px;
  display: inline-block;
  margin: 0 24.7px;
  float: left;
  transition: all .2s ease-out;
}

.orb:hover {
  transform: scale(1.2);
  opacity: .5;
  cursor: pointer;
}

.red {background:red;}
.yellow {background:yellow;}
.blue {background:blue;}
.orange {background:orange;}
.purple {background:purple;}
.green {background:green;}

.marquee {
  height: 200px;
  width: 800px;
  border: 2px solid #eee;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  margin: 200px auto;
}

.marquee--inner {
  display: block;
  width: 200%;
  margin: 70px 0;
  position: absolute;
  animation: marquee 20s linear infinite;
}

.marquee--inner:hover {
  animation-play-state: paused;
}

/*.half {
  float: left;
  width: 10%;
}*/

span {
  float: left;
  width: 50%:
}

@keyframes marquee {
  0% { left: 0; }
  100% { left: -100%; }
}
              
            
!

JS

              
                // Notes
//
// The total width of all items within span must = the width of the marquee
//
// Marquee div must be a fixed width :(
//
// The span must occur twice in order for the infinite scroll illusion to work
              
            
!
999px

Console