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="horizontal">
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
</div>

<div class="vertical">
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'><img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
  <img src='https://images.unsplash.com/photo-1653161910616-afc6acb861d9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NTMzNzUyNTk&ixlib=rb-1.2.1&q=80&w=400'>
</div>

<div class="log"></div>

<div class="speed">
  <label>
    <input type="radio" name="speed" value="regular" checked>
    regular speed
  </label>
  <label>
    <input type="radio" name="speed" value="half">
    half speed
  </label>
</div>
              
            
!

CSS

              
                :root {
  font: 20px system-ui;
}

body {
  display: flex;
}

.horizontal,
.vertical {
  width: 50vw;
  height: 100vh;
  overflow: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  box-sizing: border-box;
}

.vertical {
  flex-direction: column;
}

img {
  height: 50vh;
}

.log {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, black, transparent 50%);
  display: flex;
  span {
    border-radius: 3px;
    padding: 0.25rem;
    &:first-child {
      background: rgba(black, 0.1);
    }
  }
}

.speed {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
}

              
            
!

JS

              
                let speed = "regular";
let log = document.querySelector(".log");
let vertical = document.querySelector(".vertical");
let horizontal = document.querySelector(".horizontal");

document.addEventListener("wheel", (ev) => {
  if (!ev.shiftKey && Math.abs(ev.deltaY) > Math.abs(ev.deltaX)) {
    if (speed == "regular") {
      vertical.scrollTop += ev.deltaY;
      horizontal.scrollLeft += ev.deltaY;
    } else {
      vertical.scrollTop += ev.deltaY / 2;
      horizontal.scrollLeft += ev.deltaY / 2;
    }
    log.innerHTML =
      "<span>↕️ " + ev.deltaY.toFixed(2) + "</span>" + log.innerHTML;
  } else {
    log.innerHTML = "<span>↔️</span>" + log.innerHTML;
  }
});

let speedToggles = document.querySelectorAll("input[name='speed']");
speedToggles.forEach((speedToggle) => {
  speedToggle.addEventListener("change", (ev) => {
    speed = speedToggle.value;
  });
});

              
            
!
999px

Console