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

              
                <section>
  writing-mode: 
  <select id="writing-mode">
    <option value="horizontal-tb">horizontal-tb</option>
    <option value="vertical-lr">vertical-lr</option>
    <option value="vertical-rl">vertical-rl</option>
  </select>
</section>

<section id="content">
  <p>水陆草木之花,可爱者甚蕃。晋陶渊明独爱菊。自李唐来,世人甚爱牡丹。予独爱莲之出淤泥而不染,濯清涟而不妖,中通外直,不蔓不枝,香远益清,亭亭净植,可远观而不可亵玩焉。</p>
  <p>予谓菊,花之隐逸者也;牡丹,花之富贵者也;莲,花之君子者也。噫!菊之爱,陶后鲜有闻。莲之爱,同予者何人?牡丹之爱,宜乎众矣。</p>
  <p>水上、陆地上各种草本木本的花,值得喜爱的非常多。晋代的陶渊明只喜爱菊花。从李氏唐朝以来,世上的人十分喜爱牡丹。而我唯独喜爱莲花从淤泥中长出却不被污染,经过清水的洗涤却不显得妖艳。它的茎内空外直,不生蔓不长枝,香气远播更加清香,笔直洁净地立在水中。人们只能远远地观赏而不能靠近赏玩它啊。</p>
  <p>我认为菊花,是花中的隐士;牡丹,是花中的富贵者;莲花,是花中品德高尚的君子。唉!对于菊花的喜爱,陶渊明以后就很少听到了。对于莲花的喜爱,像我一样的还有什么人呢?对于牡丹的喜爱,当然就很多人了!</p>
</section>
              
            
!

CSS

              
                p {
  margin: 50px 100px;
}
              
            
!

JS

              
                document.querySelector('#writing-mode').addEventListener('change', event => {
  document.querySelector('#content').style.writingMode = event.target.value;
})
              
            
!
999px

Console