Pen Settings



CSS Base

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

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.


  <div style="line-height:2.5rem" :style="getStyle">兔兔教</div>
  <button @click="theme='red'">紅色主題</button>
  <button @click="theme='blue'">藍色主題</button>
  <button @click="theme='green'">綠色主題</button>

export default {
  data() {
    return {
      theme: "red",
      mystyle: {}
  computed: {
        this.mystyle.color = 'red'
        this.mystyle.backgroundColor = 'pink'
      else if(this.theme==='blue') {
        this.mystyle.color = 'blue'
        this.mystyle.backgroundColor = 'lightblue'
      else {
        this.mystyle.color = 'green'
        this.mystyle.backgroundColor = 'lightgreen'
      return this.mystyle