codepenhttps://codepen.io/kevin-chang-the-sasster/pen/MWKmbzM

<div class="box1">
    <table><!--表格-->
      <tr><!--第一列-->
        <!--th代表標題列-->
        <th>欄位一</th><!--第一行-->
        <th>欄位二</th><!--第二行-->
        <th>欄位三</th><!--第三行-->
      </tr>
      <tr>
        <td>值1</td>
        <td>值2</td>
        <td>值3</td>
      </tr>
      <tr>
        <td>值4</td>
        <td>值5</td>
        <td>值6</td>
      </tr>
    </table>
  </div>
  <div class="box2"><!--表單-->
    <form action=""><!--寫入資料庫路徑-->
      <!--text 代表文字輸入框-->
      <input type="text" name="name">
      <input type="text" name="tel">
      <input type="text" name="email">
      <!--submit 代表送出資料按鈕-->
      <input type="submit" value="送出">
    </form>
  </div>
  <div class="box3"><!--表單-->
    <form action=""><!--寫入資料庫路徑-->
      <!--text 代表單行文字輸入框-->
      <label for="mail">姓名:</label>
      <input id="mail" type="text" placeholder="請輸入姓名" name="name">
      <label for="tel">電話:</label>
      <input id="tel" type="text" placeholder="請輸入電話" name="tel">
      <label for="mail">Mail:</label>
      <input id="mail" type="text" placeholder="請輸入mail" name="mail">
      <!--submit 代表送出資料按鈕-->
      <input type="submit" value="送出">
    </form>
  </div>
  <div class="box4">
    <form action="">
      <h2>性別:</h2>
      <!--radio 單選-->
      <input type="radio" name="sex" value="male"> 男生
      <input type="radio" name="sex" value="woman"> 女生
      <h2>興趣:</h2>
      <!--checkbox 多選-->
      <input type="checkbox" name="hobby" value="movie"> 看電影
      <input type="checkbox" name="hobby" value="music"> 聽音樂
      <input type="checkbox" name="hobby" value="sport"> 運動
      <br>
      <label for="bir">生日:</label>
      <!--select 下拉選單-->
      <select name="birth" id="bir">
        <!--option 下拉選項-->
        <option value="1989">1989</option>
        <option value="1989">1990</option>
      </select>
      <br>
      <!--textarea 多行文字輸入-->
      <textarea name="content" id="" cols="" rows=""></textarea>
      <br>
      <input type="submit" value="送出">
      </form>
  </div>
.box1{
    margin-bottom30px;
  }
  
  table {
    margin-top20px;
    margin-left20px;
  }
  
  table thtable td {
    bordersolid 1px black;
    padding10px;
    font-family"微軟正黑體";
  }
  
  table th {
    padding10px;
    font-weightbold;
    background#0984e3;
    color#fff;
  }
  
  .box2 {
    margin-left20px;
    margin-bottom30px;
  }
  
  .box3 {
    margin-left20px;
    margin-bottom30px;
  }
  
  .box4 {
    margin-left20px;
  }
  
  .box4 h2.box4 input.box4 select.box4 textarea {
    margin-bottom10px;
  }
  
  .box4 textarea {
    width300px;
    height100px;
  }
文章標籤
全站熱搜
創作者介紹
創作者 Kevin Chang 的頭像
Kevin Chang

Kevin Chang的前端學習部落格

Kevin Chang 發表在 痞客邦 留言(0) 人氣(7)