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

              
                <table class="scrolltable scrolltable-flip">
  <thead>
    <tr>
      <th>Film Title</th>
      <th>Released</th>
      <th>Studio</td>
      <th>Domestic Gross</th>
      <th>Worldwide Gross</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Avatar</td>
      <td>2009</td>
      <td>20th Century Fox</td>
      <td>$760,507,625</td>
      <td>$2,085,391,916</td>
    </tr>
    <tr>
      <td>Avengers: Endgame</td>
      <td>2019</td>
      <td>Marvel</td>
      <td>$858,373,000</td>
      <td>$1,939,427,564</td>
    </tr>
    <tr>
      <td>Titantic</td>
      <td>1997</td>
      <td>Paramount Pictures</td>
      <td>$400,953,009</td>
      <td>$1,548,622,601</td>
    </tr>
    <tr>
      <td>Star Wars Ep. VII: The Force Awakens</td>
      <td>2015</td>
      <td>Walt Disney</td>
      <td>$608,581,744</td>
      <td>$1,127,953,592</td>
    </tr>
    <tr>
      <td>Avengers: Infinity War</td>
      <td>2018</td>
      <td>Marvel</td>
      <td>$678,815,482</td>
      <td>$1,369,544,272</td>
    </tr>
    <tr>
      <td>Spiderman: No Way Home</td>
      <td>2021</td>
      <td>Marvel/Columbia</td>
      <td>$804,275,316</td>
      <td>$1,086,216,214</td>
    </tr>
    <tr>
      <td>Jurrasic World</td>
      <td>2015</td>
      <td>Universal</td>
      <td>$652,306,625</td>
      <td>$1,017,673,342</td>
    </tr>
    <tr>
      <td style="min-width: 100px;">The Lion King</td>
      <td>2019</td>
      <td>Walt Disney</td>
      <td>$264,624,300</td>
      <td>$1,110,729,382</td>
    </tr>
  </tbody>
</table>

              
            
!

CSS

              
                /*! // CodePen house keeping */
 body {
	 margin: 0 auto;
	 padding: 24px;
	 font-size: 14px;
	 line-height: 20px;
}

 table {
	 
}
 a {
	 color: #0074cc;
}

table {
  font-family: 'noto', arial, sans-serif;
  font-size: 14px;
  color: #131e29;
}


 .scrolltable {
	 display: inline-block;
	 vertical-align: top;
	 max-width: 100%;
	 overflow-x: auto;
	 white-space: nowrap;
	 border-collapse: collapse;
	 border-spacing: 0;
}
 .scrolltable, .scrolltable-flip tbody {
	 -webkit-overflow-scrolling: touch;
	 background: radial-gradient(left, ellipse, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, 0) 75%) 0 center, radial-gradient(right, ellipse, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, 0) 75%) 100% center;
	 background-size: 10px 100%, 10px 100%;
	 background-attachment: scroll, scroll;
	 background-repeat: no-repeat;
}
 .scrolltable td:first-child, .scrolltable-flip tbody tr:first-child {
	 background-image: linear-gradient(to right, #F4F4F4 4%, #FFFFFF 10%);
	 background-repeat: no-repeat;
	 background-size: 20px 100%;
}
 .scrolltable td:last-child, .scrolltable-flip tbody tr:last-child {
	 background-image: linear-gradient(to left, #F4F4F4 16%, #FFFFFF 10%);
	 background-repeat: no-repeat;
	 background-position: 100% 0;
	 background-size: 20px 100%;
}
 .scrolltable th {
	 font-size: 14px;
	 text-align: left;
	 background: #ffffff;
   font-weight: normal;
}
 .scrolltable th, .scrolltable td {
	 padding: 8px 16px;
	 border: 1px solid #DBE2E9;
}
 .scrolltable-flip {
	 display: flex;
	 overflow: hidden;
	 background: none;
}
 .scrolltable-flip thead {
	 display: flex;
	 flex-shrink: 0;
	 min-width: min-content;
}
 .scrolltable-flip tbody {
	 display: flex;
	 position: relative;
	 overflow-x: auto;
	 overflow-y: hidden;
}
 .scrolltable-flip tr {
	 display: flex;
	 flex-direction: column;
	 min-width: min-content;
	 flex-shrink: 0;
}
 .scrolltable-flip td, .scrolltable-flip th {
	 display: block;
}
 .scrolltable-flip td {
	 background-image: none !important;
	 border-left: 0;
}
 .scrolltable-flip th:not(:last-child), .scrolltable-flip td:not(:last-child) {
	 border-bottom: 0;
}

              
            
!

JS

              
                
              
            
!
999px

Console