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="button btn-label-ad1">
  <a href="#">こちらはスタイル1</a>
</div>

<div class="button btn-label-ad2">
  <a href="#">こちらはスタイル2</a>
</div>


              
            
!

CSS

              
                /*** ボタン用装飾 ***/
.button{
  text-align: center;
  margin: 2rem;
}
/* リンク部分 */
.button a{
  display: inline-block;
  padding: 1em 4.5em;
  color: #fff;
  background: #2e8b57; /*ボタン色*/
  text-decoration: none; /*下線削除*/
  box-shadow: 0 4px 8px rgba(0, 0, 0, 20%);
  position: relative; /*疑似要素の基点*/
}


/**************************************
 広告表記の追加スタイル
**************************************/

/*** スタイル1 ***/
.btn-label-ad1 a:before{
  content: "Ad";
  position: absolute;
  left: 0; /*左端*/
  top: 0;
  height: 100%;
  writing-mode: vertical-rl; /*縦書きにする*/
  text-orientation: upright; /*英数字を縦に*/
  font-size: 0.7em;
  font-weight: bold;
  color: #2e8b57; /*文字色はボタン色に*/
  background: #C9EDD8; /*背景色*/
}

/*** スタイル2 ***/
.btn-label-ad2 a:before{
  content: "[Ad]";
  position: absolute;
  left: 0; /*左端*/
  top: 0;
  height: 100%;
  writing-mode: vertical-rl; /*縦書きにする*/
  font-size: 0.7em;
  font-weight: bold;
  color: #2e8b57; /*文字色はボタン色に*/
  background: #C9EDD8; /*背景色*/
}


/*** 以下、サンプル用装飾 ***/
body{
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console