Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!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>
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console