Pen Settings

HTML

CSS

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.

+ 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

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.

HTML

              
                <div class="main">
  <div class="mainleft">
    <div class="mainleft_con">
      <div class="addlist">
        <input type="text" placeholder="add a new mission…" id="addlist">
        <i class="material-icons" onclick="addlist();">add</i>
      </div>
      <div class="listname">
        <div class="finishbtn"></div>
        <span id="nowname">The First thing to do today</span>
        <div class="circles">
          <li> </li>
          
        </div>
      </div>
      <p class="listtime">25:00</p>
      <div class="lists">
        <ul id="otherlist">
          <li>the second thing to do today  <i class="material-icons">play_circle_outline
</i></li>
          <li>the third thing to do today<i class="material-icons">play_circle_outline
</i></li>
          <li>the forth thing to do today<i class="material-icons">play_circle_outline
</i></li>
        </ul>
        <div class="more">MORE</div>
      </div>
    </div>
  </div>
  <div class="player_border">
      <div class="player_left"> 
        <div class="leftcircle"></div>
      </div>
    <div class="player_right">         </div>
      <div class="player">
        <i class="material-icons" id="workstart">play_circle_filled
        </i>
        <div class="player_rs"></div>
      </div>
  </div>
  <div class="mainright">
    <div class="rightnav">
      <i class="material-icons navbtn">format_list_bulleted</i>
       <i class="material-icons navbtn">assessment</i>
       <i class="material-icons navbtn">library_music</i>
    </div>
    <span class="rightnav_txt">POMODORO</span>
  </div>
</div>
              
            
!

CSS

              
                html,body{
  height: 100%;
  padding: 0;  
  margin: 0; 
}
.main{
  width:100%;
  min-height: 100%;
  font-family:'Roboto','微軟正黑體';
  text-transform:uppercase;
  overflow:auto;
  display: -webkit-flex;
  display: flex;
  flex-wrap:nowrap;
  -webkit-flex-wrap: nowrap;
  position:relative;
}
.mainleft{
  float:left;
  width:calc(100% - 450px);
  background:#FFEDF7;
  padding-bottom:48px;
}
.mainleft_con{
  margin:48px 0 0 85px;
  width:445px;
}
.addlist{
  position:relative;
  width:100%;
}
.addlist input{
  width:413px;
  padding:19px 16px;
  border:0;
  color:#FF4384;
  font-size:16px;
  font-weight:bold;
}

.addlist i{
  position:absolute;
  top:calc(50% - 12px);
  right:16px;
  color:#FF4384;
}
.mainleft input::placeholder{
  color:#FF4384;
  font-style:italic;
}
.listname{
  margin-top:145px;
  width:100%;
  height:48px;
  position:relative;
}
.listname span{
  font-size:24px;
  color:#003164;
  font-weight:bold;
  vertical-align:top;
}
.finishbtn{
   border:2px solid #003164;
  width:48px;
  height:48px;
  border-radius:50%;
  display: inline-block;
  margin-right:16px;

}
.finishbtn span::before{
  content:"";
  background:#003164;
  width:8px;
  height:20px;
  position: absolute;
  transform:rotate(135deg);
  -webkit-transform:rotate(135deg);
  top: 20px;
  left: 12px;
}
.finishbtn span::after{
  content:"";
  background:#003164;
  width:8px;
  height:32px;
  position: absolute;
  transform:rotate(45deg);
  -webkit-transform:rotate(45deg);
  top: 12px;
  left: 27px;
}
.circles{
	width:calc(100% - 70px);
	margin:-24px auto auto 70px;
}
.circles li{
	display:inline-block;
	border:1px solid #FF4384;
	width:12px;
	height:12px;
	border-radius:50%;
	margin-right:8px;
}
.listtime{
  font-size:176px;
  color:#FF4384;
  margin:0px;
}
.lists{
  margin-top:110px;
}
.lists ul{margin:0;padding-inline-start:0;}
.lists ul li{
  list-style:none;
  font-size:16px;
  font-weight:bold;
  color:#003164;
  vertical-align:center;
  padding-top:12px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(0, 49, 100, 0.2);
}
.lists ul li i{float:right;}
.lists ul li::before{
    content:"";
  border:2px solid #003164;
  width:20px;
  height:20px;
  border-radius:50%;
  display: inline-block;
  vertical-align:top;
  margin-right:4px;
}
.more{color:#FF4384;font-size:16px;text-align:right;font-weight:bold;}
.player_border{
  position:absolute;
  width:540px;
  height:540px;
  top:130px;
  right:180px;
  border:4px solid #FF4384;
  border-radius:50%;
  z-index:2;
}
.player_left,.player_right{
  width:51%;
  height:100%;
  position:absolute;
  overflow: hidden;
  display:none;
}
.player_right{right:0;}
.leftcircle{
  width: 519px;
	height: 519px;
	border-radius: 50%;
	position: absolute;
	top:0;
	left: 0;
  border:11px solid transparent;
	border-top:11px solid #FF4384;
	border-left:11px solid #FF4384;
	transform : rotate(-135deg);
  
}
.player_line{
  display:none;
  width:520px;
  height:520px;
  border-radius:50%;
  border:10px solid #FF4384;
  position:absolute;
}
.player{
  background:#FF4384;
  border-radius:50%;
  width:520px;
  height:520px;
  margin:10px;
  position:relative;
}
.player i{
  font-size:96px;
  color:white;
  position:absolute;
  left:calc(50% - 48px);
  top:calc(50% - 48px);
}
.player_rs{
  width:14px;
  height:14px;
  background:white;
  position:absolute;
  top:calc(50% + 25px);
  left:calc(50% + 48px);
}
.mainright{
  background:#003164;
  float:right;
  width:450px;
  position:relative;
  padding-bottom:48px;
}
.rightnav{
  width:36px;
  height:100%;
  position:absolute;
  right:85px;
}
.navbtn{
  margin:48px auto 0 auto;
  font-size:36px;
  color:white;
}
.rightnav_txt{
  -webkit-writing-mode: vertical-lr;
  writing-mode: vertical-lr ;
  color:white;
  font-size:24px;
  font-weight:bold;
  position:absolute;
  right:85px;
  bottom:48px;
}
.material-icons:hover,.player_rs,.finishbtn{cursor:pointer;}
              
            
!

JS

              
                var wtime=25*60;
var s=0;
var list=[{"name":"第一個項目","time":"","finish":"0"},{"name":"第二個項目","time":"","finish":"0"},{"name":"第三個項目","time":"","finish":"0"},{"name":"第四個項目","time":"","finish":"0"}];
//list.push({"name":"2","time":"250"});
$(document).ready(function(){
  loadlist();
  $("#workstart").click(function(){
    if(s==0)
      {
        $("#workstart").html('pause_circle_filled');
        $("#workstart").css("color","#FF4384");
        $(".player").css({"background":"white","border":"4px solid #FF4384","width":"512px","height":"512px"});
        $(".player_rs").css("background","#FF4384");
        timer=setInterval("workstart()", 1000);
        s=1;
      }
    else if(s==1){
      $("#workstart").html('play_circle_filled');
        $("#workstart").css("color","white");
        $(".player").css({"background":"#FF4384","border":"none","width":"520px","height":"520px"});
        $(".player_rs").css("background","white");
      clearInterval(timer);
      s=0;
    }
  });
  $(".player_rs").click(function(){
     clearInterval(timer);
      wtime=25*60+1;
      workstart();
  });
  $(".finishbtn").click(function(){
     var con= $(".finishbtn").html();
     if(con=='') $(".finishbtn").html('<span></span>');
      else $(".finishbtn").html('');
  });
});
function loadlist(){
  if(list){
     $("#nowname").html(list[0].name);
    var otherlist='<ul>';
    for(i=1;i<list.length;i++){
      otherlist=otherlist+'<li>'+list[i].name+'<i class="material-icons">play_circle_outline</i></li>';
    }
    otherlist=otherlist+'</ul>';
    $("#otherlist").html(otherlist);
  }

}
function addlist(){
  var listname=$("#addlist").val();
  list.push({"name":listname,"time":"","finish":"0"});
  loadlist();
  $("#addlist").val('');
}
function workstart(){
  if(wtime>0){
      wtime=wtime-1;
      var sec=wtime % 60;
      if(sec<10) sec='0'+sec;
      var min= Math.floor(wtime / 60);
      if(min<10) min='0'+min;
      $(".listtime").html(min+':'+sec);
  }
  else clearInterval(timer);
} 
              
            
!
999px

Console