Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  <title>Document</title>
</head>
<body class="py-5">

<div class="container">
  <h1>グリッドの整列</h1>
  <!-- 左右に揃える -->
  <div class="row mb-3 justify-content-start">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">左揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 justify-content-end">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">右揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 justify-content-center">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">中央揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 justify-content-around">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">中央に均等揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 justify-content-between">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">両端に均等揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>

  <hr>

  <!-- 上下に揃える -->
  <div class="row mb-3 align-items-start border" style="height: 100px;">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">上揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 align-items-end border" style="height: 100px;">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">下揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
  <div class="row mb-3 align-items-center border" style="height: 100px;">
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">中央揃え</div>
    </div>
    <div class="col-3">
      <div class="p-3 bg-light">col-3</div>
    </div>
  </div>
</div>

<hr>

<div class="container">
  <h1>グリッドの順序入れ替え</h1>
  <div class="row">
    <div class="col-lg-9 order-lg-2">
      <div class="p-3 bg-light">メインエリアを右に表示(スマホではサイドバーの上)</div>
    </div>
    <div class="col-lg-3 order-lg-1">
      <div class="p-3 bg-light">サイドバーを左に表示(スマホではメインエリアの下)</div>
    </div>
  </div>
</div>

<hr>

</div>
</body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console