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

              
                <h3>CSSのtext-decorationで下線を引く方法</h3>
<p class="underline-text-decoration">一番シンプルな`text-decoration`で下線を引く方法。</p>
<p class="through-text-decoration">`text-decoration`で取り消し線を引く</p>

<h3>borderで点線やドットの下線を作る方法</h3>
<p class="border-solid">CSSの`border`プロパティで下線を引く。</p>
<p class="border-dotted">CSSの`border`プロパティで点線を引く。</p>
<p class="border-dashed">CSSの`border`プロパティで点線を引くその2。</p>

<h3>borderの長さと文字と同じ長さにする</h3>
<p class="border-inline">CSSの`border`プロパティで下線を引く。</p>

<h3>borderの長さを指定していろんなサイズの下線を引く</h3>
<p class="border-half">CSSの`border`で半分サイズの下線を引く</p>
<br>
<p class="border-30">CSSの`border`で長さ30pxの下線を引く</p>
<br>
<p class="border-30-center">CSSの`border`で下線を中央に配置する</p>

<h3>borderでマーカーっぽいアンダーラインを作る</h3>
<p class="border-marker">CSSの`border`でマーカーっぽい下線を引く</p>
<p>CSSで<span class="border-marker">この文字だけ</span>マーカっぽい下線を引く</p>

<h3>backgroundでマーカー風のおしゃれな下線を作る方法</h3>
<p class="box-half">CSSの`background`で半分サイズの下線を引く</p>
<br>
<p class="box-30">CSSの`background`で長さ30pxの下線を引く</p>
<br>
<p class="box-30-center">CSSの`background`で下線を中央に配置する</p>

<h3>backgroundでマーカーっぽいおしゃれな下線を作る</h3>
<p class="background-marker">CSSの`background`でマーカーっぽい下線を引く</p>
<p>CSSで<span class="background-marker">この文字だけ</span>マーカっぽい下線を引く</p>
              
            
!

CSS

              
                body {
  padding: 50px;
}
h3 {
  margin-top: 100px;
}

.underline-text-decoration {
  text-decoration: underline;
}
.through-text-decoration {
  text-decoration: line-through;
}

.border-solid {
  border-bottom: 1px solid #000;
}
.border-dotted {
  border-bottom: 1px dotted #000;
}
.border-dashed {
  border-bottom: 1px dashed #000;
}

.border-inline {
  display: inline-block;
  border-bottom: 1px solid #000;
}

.border-half,
.border-30,
.border-marker,
.border-30-center {
  display: inline-block;
  position: relative;
}
.border-half::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50%;
  border-bottom: 2px solid #000;
}
.border-30::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30px;
  border-bottom: 5px solid #2445da;
}
.border-30-center::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-49%);
  width: 30px;
  border-bottom: 5px solid #da2424;
}
.border-marker::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  border-bottom: 10px solid #ffea6d;
  z-index: -1;
}


.box-half,
.box-30,
.box-30-center {
  display: inline-block;
  position: relative;
}
.box-half::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50%;
  height: 5px;
  background-color: #000;
}
.box-30::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30px;
  height: 5px;
  background-color: #2445da;
}
.box-30-center::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-49%);
  width: 30px;
  height: 5px;
  background-color: #da2424;
}

.background-marker {
  display: inline-block;
  position: relative;
}
.background-marker::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: #ffea6d;
  z-index: -1;
}
              
            
!

JS

              
                
              
            
!
999px

Console