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

              
                <body class="bg-dark">
  <div class="container mt-5">
    <div id="app" class="row justify-content-center row-gap-4">
      <div class="col-md-4" v-for="note in notes">
        <div class="note card text-white" :style="{backgroundColor: note.color}">
          <div class="card-body">
            <h3 class="title card-title mb-3">{{note.title}}</h3>
            <p class="content card-text">{{note.content}}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
              
            
!

CSS

              
                .note {
  height: 200px;
}

              
            
!

JS

              
                const { createApp } = Vue;

createApp({
  data() {
    return {
      notes: [
        {
          title: "春節行程安排",
          content: "吃飽睡,睡飽吃",
          color: "red"
        },
        {
          title: "工作待辦事項",
          content: "詢問各家廠商報價",
          color: "green"
        },
        {
          title: "運動健身計畫",
          content: "每天早上六點去健身",
          color: "blue"
        }
      ]
    };
  },
  mounted() {
    this.notes[0].content = "多出門、到處走走、也要多運動";
  }
}).mount("#app");

              
            
!
999px

Console