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="container">
  <p class="title">border-bottomを使った場合(悪い例)</p>
  <p class="border">
    あなたはほか無論その反対家によって方のためを引込んだでし。
  </p>
  <p class="border">
    あなたはほか無論その反対家によって方のためを引込んだでし。あなたはほか無論その反対家によって方のためを引込んだでし。あなたはほか無論その反対家によって方のためを引込んだでし。
  </p>
</div>
<div class="container">
  <p class="title">linear-gradient()とbackgoround-sizeを使った場合(良い例)</p>
  <div class="note">
    <p>
      あなたはほか無論その反対家によって方のためを引込んだでし。
    </p>
    <p>
      あなたはほか無論その反対家によって方のためを引込んだでし。あなたはほか無論その反対家によって方のためを引込んだでし。あなたはほか無論その反対家によって方のためを引込んだでし。
    </p>
  </div>
</div>
<div class="container">
  <p>
    解説記事: <a href="https://blog.proglearn.com/?p=2706">【CSS】ノートのようなレイアウトを作りたい!【仕組みも解説するよ】 - ProgLearn</a>
  </p>
</div>
              
            
!

CSS

              
                
.note {
  background: linear-gradient(#ccc 1px, transparent 2px);
  background-size: auto 2rem;
}

.note p {
  line-height: 2rem;
  margin: 0;
}

/* 悪い例: border-bottomを使った場合 */
.border {
  padding: 4px 0;
  border-bottom: 1px #ccc solid;
}

/* 以下、レイアウト用CSS */
.container {
  padding: 24px 0;
  width: 80%;
}

.title {
  font-size: 1.5rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console