練習1-1:<br>JS

JS練習

(一)Html結構及CSS結構

  <header>
    <div id="interTime"></div>
    <div id="runTime"></div>
  </header>
  <div id="main">
      h1標題區域:<h1>h1內容</h1>
    <hr>
      id區域:<span id="id">id內容</span>
    <br>
      class區域1:<span class="class">class內容1</span>
    <br>
      class區域2:<span class="class">class內容2</span>
  </div>
  <footer> footer </footer>
  <style>
    *{ padding:0; margin:0; }
    body{
      font-family:"Courier New", "微軟正黑體", sans-serif;
      width:90%; margin:0 auto; min-width: 800px;
    }
    header{
      height:150px; background:#fcd4dc; position:relative;
      font-size:20px; color:#4D0001;
    }
    #main{ min-height:300px; background:#d2e4ee; line-height: 50px;}
    h1{display: inline-block; color: #0000ff; font-size: 18px;}
    .class,#id{color: blue;}
    footer{height:50px; background:#EFF1CB;}
    #interTime{ position:absolute; left:0; bottom:0;}
    #runTime{ position:absolute; right:0; bottom:0;}
  </style>