cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

 <link rel="stylesheet" href="https://rawgit.com/tastejs/todomvc-common/v0.1.11/base.css">

<div id="todoapp"></div>

<footer id="info">
  <p>Double-click to edit a todo</p>
  <p>Created by @leeluolee</p>
    Part of
    <a href="http://todomvc.com">TodoMVC</a>

<script type='template/regular' id='todomvc'>
    <input id="new-todo" placeholder="What needs to be done?">
  <section id="main">
    <input id="toggle-all" type="checkbox">
    <label for="toggle-all">Mark all as complete</label>
    <ul id="todo-list">
      {#list todos as todo}
<li  r-class={ {'completed': todo.completed, 'editing': todo.editing} }>
    <div class="view">
      <input class="toggle" type="checkbox" r-model={ todo.completed }>
        <label on-dblclick={todo.editing = true}>{ todo.description }</label>
        <button on-click={ todos.splice(todo_index,1) } class="destroy"></button>
      <input id="edit" class="edit" on-enter={ todo.editing = false } r-model={todo.description} autofocus>
  <footer id="footer">
    <span id="todo-count"> <strong>1</strong>
      item left
    <ul id="filters">
      <li> <a class="selected">All</a> </li>
      <li> <a class="">Active</a> </li>
      <li> <a class="">Completed</a> </li>
    <button id="clear-completed">Clear completed (1)</button>
  <!-- 引入regularjs -->
<script src="https://rawgit.com/regularjs/regular/master/dist/regular.js"></script>

var TodoMVC = Regular.extend({
    template: "#todomvc"
var todos = [
    {completed: true, description: "sleep" },
    {completed: false, description: "work" }
var app = new TodoMVC({
    data: {todos: todos}
Loading ..................