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

              
                <body>
  <main>

    <div class="vertical-text-outer">
      <div class="vertical-text-inner">
        <h2>縦書き文章のCSS</h2>
        <p>
          この記事では、CSSを使って縦書きで文章をコーディングする方法を紹介します。WEBサイトは基本的に横書きですが、和風テイストのサイトでは縦書きが良く使われますので、CSSで縦書きにする方法も覚えておくべきしょう。
          <br>
          この記事では、CSSを使って縦書きで文章をコーディングする方法を紹介します。WEBサイトは基本的に横書きですが、和風テイストのサイトでは縦書きが良く使われますので、CSSで縦書きにする方法も覚えておくべきしょう。
        </p>
        <p>
          この記事では、CSSを使って縦書きで文章をコーディングする方法を紹介します。WEBサイトは基本的に横書きですが、和風テイストのサイトでは縦書きが良く使われますので、CSSで縦書きにする方法も覚えておくべきしょう。
        </p>
      </div>
    </div>

  </main>
</body>
              
            
!

CSS

              
                @charset "UTF-8";
body {
  font-family: "Noto Sans JP", "メイリオ", "Meiryo", "MS ゴシック",
    "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", sans-serif;
}

main {
  margin: 0 auto;
  padding: 30px;
}
/* 右寄せ・左寄せ・中央寄せを設定するタグのスタイル */
.vertical-text-outer{
  text-align: right;
}
/* 縦書き設定・カラム数設定・height設定用タグのスタイル */
.vertical-text-inner{
  writing-mode: vertical-rl;
  display: inline-block;
  height: 600px;
  text-align: justify;
}
/* 以下、縦書きコンテンツ本体のスタイル */
h2{
  font-size: 18px;
  font-weight: 800;
  margin-left: 1em;
}
p {
  line-height: 1.8;
  margin-left: 1em;
}

              
            
!

JS

              
                
              
            
!
999px

Console