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

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

              
                <!-- Marquee Scrolling -->
<style>
  /* CSS styles for the marquee effect */
  .marquee-track {
    position: absolute;
    /* Position the element absolutely */
    white-space: nowrap;
    /* Don't allow text to wrap */
    will-change: transform;
    /* Optimize for animation */
    animation-delay: 4s;
    /* Delay the animation by 4 seconds */
    opacity: 0;
    /* Set initial opacity to 0 */
    backface-visibility: hidden;
    /* Hide the backface of the element */
  }

  /* CSS styles for when the animation should start */
  .marquee-track.start {
    opacity: 1;
    /* Set opacity to 1 to show the element */
    animation-play-state: running;
    /* Start the animation */
    -moz-animation: marquee 30s linear infinite reverse;
    /* Set the animation for Firefox */
    -webkit-animation: marquee 30s linear infinite reverse;
    /* Set the animation for Webkit browsers */
    animation: marquee 30s linear infinite reverse;
    /* Set the animation for all other browsers */
  }

  /* CSS keyframes for the marquee animation */
  @keyframes marquee {
    from {
      -moz-transform: translateX(-50%);
      /* Move the text left by 50% of its width */
      -webkit-transform: translateX(-50%);
      transform: translateX(-50%);
    }

    to {
      -moz-transform: translateX(0%);
      /* Move the text back to its starting position */
      -webkit-transform: translateX(0%);
      transform: translateX(0%);
    }
  }
</style>

<!-- JavaScript code to trigger the animation -->
<script>
  document.addEventListener("DOMContentLoaded", function() {
    // Get the Vimeo iframe element
    var iframe = document.getElementById("vimeo-video");
    // Create a new Vimeo player instance
    var player = new Vimeo.Player(iframe);
    // Set up an event listener for when the player is played
    player.on('play', function() {
      // Trigger the CSS animation by adding the "start" class to the "marquee-track" element
      document.querySelector(".marquee-track").classList.add("start");
    });
  });
</script>
<!-- End Marquee Scrolling -->
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console