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.


                <canvas id="main"></canvas>


                * {padding: 0; margin: 0}


                const app = new PIXI.Application({
  view: document.getElementById('main'),
  width: 200,
  height: 200,
  antialias: true,
  transparent: false,
  backgroundColor: 0x00CC99,

const container = new PIXI.Container();

const style = new PIXI.TextStyle({
  fontFamily: 'Microsoft JhengHei', // 風格
  fontSize: 24, // 字體大小
  fill: [0xEEEE00,0x00ff99], // 填滿,若是陣列則可以漸層效果
  align: 'center', // 對齊
  stroke: '#000000', // 外框顏色
  strokeThickness: 8, // 外框粗細
  dropShadow: true, // 必須設為 True 才會啟用
  dropShadowColor: '#ffffff', 
  dropShadowAngle: 5, // 陰影的角
  dropShadowDistance: 10, // 陰影距離
  wordWrap: true, // 啟用斷行
  wordWrapWidth: 5, // 長度多少就斷行

const text = new PIXI.Text('這是一段話', style);