css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <div class="wrapper">
  <div>
    <h1>デフォルト</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>上から bold (700)、500、normal (400)。</p>
  </div>
  <div class="perfect-yu-gothic-custom">
    <h1>Perfect Yu Gothic Custom</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>@font-face で全指定</p>
  </div>
  <div class="yu-yu-gothic">
    <h1>YuGothic + Yu Gothic</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win・Mac 向け</p>
  </div>
</div>

<div class="wrapper">
  <div class="yu-gothic">
    <h1>Yu Gothic</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win Chrome : 太・普通・細め</p>
    <p>Win Firefox : 太・普通・普通 (いずれも同じ見え方)</p>
    <p>Win Edge : 太・普通・細め</p>
    <p>Win IE : 太・普通・細め</p>
  </div>
  <div class="yu-gothic-weight">
    <h1>Yu Gothic (font-weight)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win Chrome : 通常文字が「Yu Gothic」よりわずかに太い</p>
  </div>
  <div class="yu-gothic-m">
    <h1>Yu Gothic M @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win Chrome : 太字に効いていない</p>
    <p>Win Firefox : 同じ見え方</p>
    <p>Win Edge : 太・普通・普通</p>
    <p>Win IE : 太・普通・普通</p>
  </div>
  <div class="yu-gothic-m2">
    <h1>Yu Gothic M2 @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win Chrome : 全部細く見える</p>
  </div>
  <div class="yu-gothic-custom">
    <h1>Yu Gothic Custom @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-medium">
    <h1>Yu Gothic Medium</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Win Chrome : 太字細め・普通・普通</p>
    <p>Win Firefox : 太字細め・普通・普通</p>
    <p>Win Edge : 太字が細め・普通・普通</p>
    <p>Win IE : 全部効いていない</p>
  </div>
</div>

<div class="wrapper">
  <div class="yu-gothic-hiragino">
    <h1>Yu Gothic + Hiragino</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-weight-hiragino">
    <h1>Yu Gothic (font-weight)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-m-hiragino">
    <h1>Yu Gothic M @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-m2-hiragino">
    <h1>Yu Gothic M2 @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-custom-hiragino">
    <h1>Yu Gothic Custom @font-face</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
  <div class="yu-gothic-medium-hiragino">
    <h1>Yu Gothic Medium</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
  </div>
</div>

<div class="wrapper">
  <div class="yugothic">
    <h1>YuGothic (for Mac)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Mac 向け</p>
  </div>
  <div class="yugothic-weight">
    <h1>YuGothic (font-weight)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>Mac 向け 500</p>
  </div>
  <div class="yu-mincho">
    <h1>Yu Mincho</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>游明朝</p>
  </div>
  <div class="yu-mincho-medium">
    <h1>Yu Mincho Medium</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>游明朝 Medium</p>
  </div>
</div>

<div class="wrapper">
  <div class="hiragino">
    <h1>Hiragino</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>ヒラギノがフォールバックされた際</p>
  </div>
  <div class="weight-hiragino">
    <h1>Hiragino (font-weight)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>ヒラギノがフォールバックされた際 500</p>
    <p>Win Chrome・IE : 通常の文字が太字になってしまう</p>
  </div>
  <div class="meiryo">
    <h1>Meiryo</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>メイリオがフォールバックされた際</p>
  </div>
  <div class="weight-meiryo">
    <h1>Meiryo (font-weight)</h1>
    <h2>テストテキスト</h2><h3>テストテキスト</h3><h4>テストテキスト</h4>
    <p>メイリオがフォールバックされた際 500</p>
  </div>
</div>

            
          
!
            
              @font-face { font-family: "Yu Gothic M"; src: local("Yu Gothic Medium"); }
@font-face { font-family: "Yu Gothic M"; src: local("Yu Gothic Bold"); font-weight: bold; }

@font-face { font-family: "Yu Gothic M2"; src: local("Yu Gothic Medium"), local("Yu Gothic"); }
@font-face { font-family: "Yu Gothic M2"; src: local("Yu Gothic Bold")  , local("Yu Gothic"); font-weight: bold; }

@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("Yu Gothic"); font-weight: 100; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("Yu Gothic"); font-weight: 200; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("Yu Gothic"); font-weight: 300; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("Yu Gothic"); font-weight: 400; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("Yu Gothic"); font-weight: 500; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Bold")  , local("YuGothic-Bold")  , local("Yu Gothic"); font-weight: 600; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Bold")  , local("YuGothic-Bold")  , local("Yu Gothic"); font-weight: 700; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Bold")  , local("YuGothic-Bold")  , local("Yu Gothic"); font-weight: 800; }
@font-face { font-family: "Yu Gothic Custom"; src: local("Yu Gothic Bold")  , local("YuGothic-Bold")  , local("Yu Gothic"); font-weight: 900; }

@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic"), local("Yu Gothic"); font-weight: 100; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic"), local("Yu Gothic"); font-weight: 200; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic"), local("Yu Gothic"); font-weight: 300; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic"), local("Yu Gothic"); font-weight: 400; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic"), local("Yu Gothic"); font-weight: 500; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Bold")  , local("Yu Gothic Bold")  , local("YuGothic"), local("Yu Gothic"); font-weight: 600; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Bold")  , local("Yu Gothic Bold")  , local("YuGothic"), local("Yu Gothic"); font-weight: 700; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Bold")  , local("Yu Gothic Bold")  , local("YuGothic"), local("Yu Gothic"); font-weight: 800; }
@font-face { font-family: "Perfect Yu Gothic Custom"; src: local("YuGothic-Bold")  , local("Yu Gothic Bold")  , local("YuGothic"), local("Yu Gothic"); font-weight: 900; }
.perfect-yu-gothic-custom { font-family: "Perfect Yu Gothic Custom", serif; }

@media screen and (-webkit-min-device-pixel-ratio:0) {
  html, body, p { font-weight: 500; }
}

.yu-yu-gothic { font-family: YuGothic, "Yu Gothic", serif; }

.yu-gothic        { font-family: "Yu Gothic"       , serif; }
.yu-gothic-weight { font-family: "Yu Gothic"       , serif; font-weight: 500; }
.yu-gothic-m      { font-family: "Yu Gothic M"     , serif; }
.yu-gothic-m2     { font-family: "Yu Gothic M2"    , serif; }
.yu-gothic-custom { font-family: "Yu Gothic Custom", serif; }
.yu-gothic-medium { font-family: "Yu Gothic Medium", serif; }

.yu-gothic-hiragino        { font-family: "Yu Gothic"       , "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }
.yu-gothic-weight-hiragino { font-family: "Yu Gothic"       , "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; ; font-weight: 500; }
.yu-gothic-m-hiragino      { font-family: "Yu Gothic M"     , "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }
.yu-gothic-m2-hiragino     { font-family: "Yu Gothic M2"    , "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }
.yu-gothic-custom-hiragino { font-family: "Yu Gothic Custom", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }
.yu-gothic-medium-hiragino { font-family: "Yu Gothic Medium", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }

.yugothic        { font-family: YuGothic, serif; }
.yugothic-weight { font-family: YuGothic, serif; font-weight: 500; }

.hiragino        { font-family: "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; }
.weight-hiragino { font-family: "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", serif; ; font-weight: 500; }

.meiryo        { font-family: Meiryo, serif; }
.weight-meiryo { font-family: Meiryo, serif; ; font-weight: 500; }

.yu-mincho        { font-family: "Yu Mincho"       , sans-serif; }
.yu-mincho-medium { font-family: "Yu Mincho Medium", sans-serif; }

*, ::before, ::after { box-sizing: border-box; }
html, body { line-height: 1; }
h1, h2, h3, h4, p { margin: 0; font-size: 2rem; }
.wrapper { display: flex; }
.wrapper > div { width: 20%; border: 1px solid #ccc; padding: 1rem; margin: .5rem; }
h1, p { font-size: 1rem; }
h2 { font-weight: bold; }
h3 { font-weight: 500; }
h4 { font-weight: normal; }
            
          
!
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.
Loading ..................

Console