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


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


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.


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.

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.


  var hours = 86 % 24;
  var day = parseInt(86 / 24);
  console.log("共需要" + day + "天零" + hours + "小时");

提示:摄氏度与华氏度的转换公式为:摄氏度 = 5/9.0*(华氏度-32) */
  var tip = (5 / 9.0) * (80 - 32);
  console.log("华氏温度80读度等于" + tip + "摄氏度");

  var num = 5.36589;
  console.log(parseInt(num * 1000) / 1000);

  var k = 0;
  console.log(k++ + ++k + k + k++); //结果是?为什么?//++y(先自加再运算)和y++(先运算再自加)
  //     k++   ++k   k  k++
  //k    1     2     2  3
  //num  0     2     4  6