创建没有框架的表

时间:2016-07-12 10:56:15

标签: html

我想画一张这样的表

enter image description here 但我无法找到使用(创建扁线)的代码

我可以使用哪个标签=?

1 个答案:

答案 0 :(得分:0)



table {
  border-collapse: collapse; /* Merge borders of neighbouring cells */
  border: 2px solid black;
}
tr:nth-child(odd) {
  background-color: #ddd;  /* Alternate background colors on rows */
}
td, th {
  border: 1px solid black;
}

<table>
  <tbody>
    <tr>
      <th>URUN KODU</th>
      <td>Encoder</td>
      <td>PWM</td>
    </tr>
    <tr> <!-- this is empty row that spans whole table and acts as "double line" -->
      <td colspan="3"> <!-- Update "colspan" attribute to number of columns -->
      </td>
    </tr>
    <tr>
      <th>M91-2-T1</th>
      <td>2</td>
      <td rowspan="2"> <!-- that's the cell that spans two rows -->
        2 (0,5 KHz)
      </td>
    <tr>
      <th>M91-2-T38</th>
      <td>2</td>
    </tr>
  </tbody>
</table>
&#13;
&#13;
&#13;