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

              
                ul
	- for (var x= 0; x<10 ;x++)
		li
			//- span ps
			//- div dp
	li
		p bg
		
// inline 空元素,基线是 margin-bottom
// 非空时,取最后内容的 baseline
// 用 inline 进行布局存在副作用,vertical-align 默认值为 baseline,不符合非文字类内容对齐要求,子元素类型有的为空,有的有文字时会发生不对齐
// baseline 行内元素的 baseline 与父元素的 baseline 对齐
              
            
!

CSS

              
                ul {
	width: 590px;
  height: 100%;
  padding: 18px 30px;
  overflow-y: auto;
	list-style: none;
	li {
		display: inline-block;
		width: 170px;
    height: 96px;
    margin: 0 10px 20px 0;
    background: #ccc;
		// vertical-align: bottom; // fix #1
		// overflow: hidden; // fix #2
	}
	img {
	}
	div {
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console