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 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.

Quick-add: + 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.

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.

              @import "compass/css3";

.todo {
  .newForm {
    margin: 16px 0;
  .item {
    margin-bottom: 6px; 
    .time {
      text-align: right;
      color: #888;
      font-size: 12px;
              /** @jsx React.DOM */

App = React.createClass({
  componentDidMount: function() {
    var self = this;
    var timer = setInterval(function() {
      self.setState({now: new Date()});
    }, 1000);
    this.setState({timer: timer});
  componentWillUnmount: function() {
    this.setState({timer: undefiend});
  getInitialState: function() {
  	return {
      now: new Date(),
      newText: "",
      items: [
        { text: "Foo", time: new Date() },
        { text: "Bar", time: new Date() }

  addItem: function() {
      items: [{text: this.state.newText, time: new Date()}].concat(this.state.items),
      newText: ""
  updateNewText: function(ev) {
      newText: ev.target.value
  render: function() {
    return <div className="container todo">
      <div className="row newForm">
        <div className="col-lg-12">
          <div className="input-group">
            <input type="text" value={this.state.newText} onChange={this.updateNewText} placeholder="Your task" className="form-control" />
            <span className="input-group-btn">
              <button onClick={this.addItem} className="btn btn-default" type="button">Add</button>

      <div className="row newForm">
        <div className="col-lg-12 text-center">
          {this.state.items.length} 件
      <div className="items">
        {this.state.items.map(function(item) {
          return <div className="item row">
         		<div className="text col-lg-12">
         		<div className="time col-lg-12">
        }, this)}

React.render(<App/>, document.body);
Loading ..................