Pen Settings



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


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.


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.


                <div id="root"></div>


   background-color: #4472C4  //4472C4 59D7FA
   // background: linear-gradient(to right, #7f00ff, #e100ff)
   // padding: 70px
   font-family: 'Fjalla One', sans-serif
   background-color: #ed7057
   width: 200px
   height: 300px
   padding: 20px
   margin: 0 auto
   margin-top: 50px
   box-shadow: 8px 8px 0.01px #444444
   border-radius: 3px
   border-top: 25px solid #355999
   color: white
   width: 100px
   // background-color: #fff
   padding: 10px 25%
   color: #525151
   text-align: center
   color: white
   margin: -25px 25% 30px 25%
   color:  white    //#525151
   text-align: center
// #month
//    width: 100px
//    color: #525151
//    // background-color: #000
   width: 150px
   height: 120px
   font-size: 80px
   background-color: #F4F6F5
   box-shadow: 2px 2px 5px #444444
   color: #525151
   border-radius: 5px
   margin: 0 auto
   text-align: center
   padding-top: 30px

   color: #525151
   border-radius: 5px
   font-size: 20px
   padding: 10px
   margin-top: -30px
   // background-color: #E4E1E1
   // color: #9A9A9B
   text-align: center
   font-size: 50px
   font-weight: 700
   color: white
   text-align: center


                function tick(){
        var week = new Array("Sunday","Monday","Tuesday","Wednesday",
        const element = (
             <h1>Cherish EVERY MOMENT!</h1>
             <div id="calendar">
                <h3 id="date">{new Date().getDate()}</h3>
                <h2 id="day">{new Date().getFullYear()} / {new Date().getMonth()+1}</h2>
                <h2 id="weekday">{week[new Date().getDay()]}</h2>
                <h2 id="time_now">{new Date().toLocaleTimeString().split("上午")}</h2>

setInterval(tick, 1000);