响应表或绝对表

时间:2013-12-06 17:36:25

标签: html css css3

一直在玩这个并且终于找到了我。在工作中,我被要求使用表格制作一个tic tac toe类型的游戏。表格如下:

<table border="1" cellspacing="0">
  <tbody>
    <tr>
      <td height="100" width="100" aligh="center" valign="center">X</td>
       ....
       ....
     </tr>
   </tbody>
</table>

想知道如何做出这种反应?

enter image description here

enter image description here

2 个答案:

答案 0 :(得分:0)

您可以尝试使用百分比进行调整。一切都基于1/3。

<table border="1" cellspacing="0" width="100%" height="100%">
  <tbody>
    <tr>
      <td height="33%" width="33%" aligh="center" valign="center">X</td>
       ....
       ....
     </tr>
   </tbody>
</table>

答案 1 :(得分:0)

您可能想尝试Footable

或者如果你使用bootstrap作为主题,你可以简单地用

围绕你的桌子
<div class="table-responsive">
// your table HTML
</div>