为什么div超出图像?

时间:2019-02-05 17:34:14

标签: html css

我正在尝试在图像上创建标头,并且如果有意义的话,其长度将超过图像。为什么是这样?这是一个片段

enter image description here

<table border="0" align="center">
  <tbody>
    <tr>
      <td>
        <div style="background-color: #002c5f; padding: 5px;"><span style="color: white;">TEST</span></div>
        <div style="padding: auto; display: block;">
          <img class="img-responsive" src="https://cdn-ds.com/media/websites/3637/content/1920x1080_AA5_D_161026.jpg?s=530799" alt="" width="350" height="250" /></div>
      </td>
      <td><img class="img-responsive" src="https://cdn-ds.com/media/websites/3637/content/1920x1080_AA5_161008.jpg?s=700334" alt="" width="350" height="250" /></td>
      <td><img class="img-responsive" src="https://cdn-ds.com/media/websites/3637/content/1920x1080_Virtual-Cockpit.jpg?s=245934" alt="" width="350" height="250" /></td>
    </tr>
  </tbody>
</table>

0 个答案:

没有答案