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

              
                Click this line and  tab or shift-tab to focus.
<div class="marquee">
    <a href="#" id="marquee1" class="item"><p class="content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam dapibus ultrices sem fermentum posuere. Vestibulum lacinia aliquet laoreet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p></a>
  
</div>
<div class="marquee">
  <a href="#" id="marquee2" class="item2"><p class="content2">Vestibulum lacinia aliquet laoreet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum non tellus id nisl commodo dictum. Sed feugiat luctus eros, ut euismod metus blandit id. Phasellus dictum placerat tellus, nec porta est bibendum quis. Fusce sit amet auctor erat. Morbi gravida pretium lectus sed adipiscing. Integer magna turpis, tristique vitae vestibulum eget, condimentum sed justo.</p></a>
</div>


              
            
!

CSS

              
                a {
  color: #eee;
  text-decoration:none;
}
.marquee {
  width: 500px;
  background-color: #393939;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}
.marquee .item .content {
   white-space: nowrap;
}
.marquee .item2 .content2 {
   display: block;
   height: 8px;
   white-space: pre-wrap;
 
 }
.marquee .item:focus .content {
  animation: horizontal-move 15s ease infinite;
  -moz-animation: horizontal-move 15s ease infinite;
  -webkit-animation: horizontal-move 15s ease infinite;
}
.marquee .item2:focus .content2 {
    animation: vertical-move 3s ease infinite;
    -moz-animation: vertical-move 3s ease infinite;
    -webkit-animation: vertical-move 3s ease infinite;
}
/** Mozilla Firefox Keyframes **/
@-moz-keyframes horizontal-move {
  0% {
    -moz-transform: translateX(100%);
  }
  100% {
    -moz-transform: translateX(-270%);
  }
}

/** Webkit Keyframes **/
@-webkit-keyframes horizontal-move {
  0% {
    -webkit-transform: translateX(100%);
  }
  100% {
    -webkit-transform: translateX(-270%);
  }
}

/** Mozilla Firefox Keyframes **/
@-moz-keyframes vertical-move {
  0% {
    -moz-transform: translateY(100%);
  }
  25% {
    -moz-transform: translateY(-300%);
  }
  50% {
   -moz-transform: translateY(-600%);
  }
  75% {
    -moz-transform: translateY(-900%);
  }
  100% {
    -moz-transform: translateY(-1200%);
  }
}

/** Webkit Keyframes **/
@-webkit-keyframes vertical-move {
  0% {
    -webkit-transform: translateY(100%);
  }
  25% {
    -webkit-transform: translateY(-300%);
  }
  50% {
    -webkit-transform: translateY(-600%);
  }
  75% {
    -webkit-transform: translateY(-900%);
  }
  100% {
    -webkit-transform: translateY(-1200%);
  }
}

              
            
!

JS

              
                window.onload = function () {
//document.getElementById("marquee2").focus();
}
              
            
!
999px

Console