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

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.

HTML

              
                <div class="marquee">
  <div class="marquee__group">
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391378/gill/1_hnnwmv.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391383/gill/2_abitd1.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/3_qzirwc.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/4_mb33s5.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391382/gill/5_cr9q1l.jpg' alt=''>
  </div>

  <div aria-hidden="true" class="marquee__group">
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391383/gill/6_b8o625.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391380/gill/7_u5epqm.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391382/gill/8_zlc3mk.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/9_kih7h5.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391378/gill/1_hnnwmv.jpg' alt=''>
  </div>
</div>

<div class="marquee marquee--borders" style="--duration: 100s">
  <div class="marquee__group">
    <p>歡迎小屁雯</p>
    <p aria-hidden="true">歡迎小屁雯</p>
    <p aria-hidden="true">歡迎小屁雯</p>
  </div>

  <div aria-hidden="true" class="marquee__group">
    <p>歡迎小屁雯</p>
    <p>歡迎小屁雯</p>
    <p>歡迎小屁雯</p>
  </div>
</div>

<div class="marquee marquee--reverse">
  <div class="marquee__group">
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391383/gill/2_abitd1.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/3_qzirwc.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/4_mb33s5.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391382/gill/5_cr9q1l.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391383/gill/6_b8o625.jpg' alt=''>
  </div>

  <div aria-hidden="true" class="marquee__group">
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391380/gill/7_u5epqm.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391382/gill/8_zlc3mk.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391384/gill/9_kih7h5.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391378/gill/1_hnnwmv.jpg' alt=''>
    <img src='https://res.cloudinary.com/dispuixah/image/upload/v1679391383/gill/2_abitd1.jpg' alt=''>
  </div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Corben:wght@700&display=swap");

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
}

body {
  --space: 2rem;

  display: grid;
  align-content: center;
  overflow: hidden;
  gap: var(--space);
  width: 100%;
  font-family: "Corben", system-ui, sans-serif;
  font-size: 3rem;
  line-height: 1.5;
}

.marquee {
  --duration: 60s;
  --gap: var(--space);

  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--gap);
  transform: skewY(-3deg);
}

.marquee__group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--gap);
  min-width: 100%;
  animation: scroll var(--duration) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__group {
    animation-play-state: paused;
  }
}

.marquee__group img {
  max-width: clamp(16rem, 1rem + 28vmin, 20rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
}

.marquee__group p {
  background-image: linear-gradient(
    75deg,
    hsl(240deg 70% 49%) 0%,
    hsl(253deg 70% 49%) 11%,
    hsl(267deg 70% 49%) 22%,
    hsl(280deg 71% 48%) 33%,
    hsl(293deg 71% 48%) 44%,
    hsl(307deg 71% 48%) 56%,
    hsl(320deg 71% 48%) 67%,
    hsl(333deg 72% 48%) 78%,
    hsl(347deg 72% 48%) 89%,
    hsl(0deg 73% 47%) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.marquee--borders {
  border-block: 3px solid dodgerblue;
  padding-block: 0.75rem;
}

.marquee--reverse .marquee__group {
  animation-direction: reverse;
  animation-delay: calc(var(--duration) / -2);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-100% - var(--gap)));
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console