Pen Settings



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


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


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.


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.


                %span Centered vertically and horizontally.



Centering: The Newest Coolest Way vs. The Oldest Coolest Way | CSS-Tricks

[CSS]幅や高さが不明な要素を中心に配置する、IE8対応の古い方法とモダンブラウザ対応の最新の方法 | コリス

/* Centering with Grid */
body {
  display: grid;
  height: 100vh;
  margin: 0;
  align-items: center;
  justify-content: center;

/* Centering with Display Table (IE8+) */
// html, body {
//   margin: 0;
//   height: 100%;
// }
// body {
//   display: table;
//   width: 100%;
// }
// body > span {
//   display: table-cell;
//   vertical-align: middle;
//   text-align: center;
// }