使HTML表具有响应性

时间:2018-09-12 05:35:41

标签: html html-table responsive

我正在尝试使此表响应于调整浏览器的大小,特别是针对移动设备。我试图将表格标签的宽度设置为100%,但这会影响图像和文本的间距。还有其他方法可以使此表响应不影响图片和文字间距的地方吗?非常感谢您的提前答复。

<table align="center" border="0" cellpadding="3" cellspacing="1" style="width: 1000px;">
  <tbody>
    <tr>
      <td style="text-align: center; vertical-align: middle;">
        <img alt="Logo" src="Logo.png" style="width: 120px; height: 100px;" />
      </td>
      <td style="vertical-align: middle; text-align: center;">
        <b><i>
          Everyone is free to use the summary information. Please acknowledge 
          the Logo as the source of any information accessed from the site unless 
          otherwise noted.<br/>
        </i></b>
      </td>
      <td style="text-align: center; vertical-align: middle;">
        <img alt="Logo" src="Logo.png" style="width: 120px; height: 100px;" />
      </td>
    </tr>
  </tbody>
</table>

1 个答案:

答案 0 :(得分:0)

您可以使用Bootstrap制作响应式网页。

有可用的不同类别,这些类别将负责响应性。

如果您不想使用引导程序,则可以将width属性设置为auto而不是固定的1000px

相关问题