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>
  <p class="under-naname">テキストに<span>斜め背景</span>の下線
  </p>
</div>
<div>
  <p class="under-naname-thin">テキストに<span>斜め背景</span>の下線</p>
</div>
              
            
!

CSS

              
                /* 色を変更 */
.under-naname span {
  display: inline-block;
  min-height: 1em;
  line-height:1.3;
  position: relative;
  z-index: 10;
}
.under-naname span::after {
  content: "";
  display: inline-block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(-45deg, #ff1481 0%, #ff1481 25%, #9ee1ff 25%, #9ee1ff 50%, #ff1481 50%, #ff1481 75%, #9ee1ff 75%, #9ee1ff 100%)repeat fixed;
  background-size: 10px 10px;
  z-index: -1;
}

/* 細め、角度を変更 */
.under-naname-thin span {
  display: inline-block;
  min-height: 1em;
  line-height:1.3;
  position: relative;
  z-index: 10;
}
.under-naname-thin span::after {
  content: "";
  display: inline-block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(-35deg, #ff1481 0%, #ff1481 20%, #9ee1ff 20%, #9ee1ff 50%, #ff1481 50%, #ff1481 70%, #9ee1ff 70%, #9ee1ff 90%, #ff1481 100%)repeat fixed;
  background-size: 12px 8px;
  z-index: -1;
}
              
            
!

JS

              
                
              
            
!
999px

Console