【问题标题】:How to make tables with images, responsive in wordpress如何用图像制作表格,在wordpress中响应
【发布时间】:2015-09-28 16:22:07
【问题描述】:

我正在尝试在我的 wordpress 博客中添加一个包含几行的简单表格,每个表格有 3 列。

<table>
<tbody>
<tr>
<td><img src="http://www.alidimare.net/images/loveIs/01.jpg" alt="Love Is"/></td>
<td><img src="http://www.alidimare.net/images/loveIs/07.jpg" alt="Love Is"/></td>
<td><img src="http://www.alidimare.net/images/loveIs/02.jpg" alt="Love Is"/></td>
</tr>

我尝试使用 Magic-liquidizer-responsive 和 tablepress-responsive 插件使其具有响应性。结果不正确,因为即使表格进入一列,图像尺寸仍然非常小。

请告诉我如何解决此问题。

【问题讨论】:

标签: html wordpress responsive-design html-table


【解决方案1】:

您需要验证是否加载了任何其他 css 文件(您的主题)覆盖您的图像 css,只需检查并验证..您可能需要制作一些自定义 css .. 您可以尝试添加“!important;”

table td img{
    width: 100% !important;
}

【讨论】:

    【解决方案2】:

    您需要图像占用 100% 的容器 (td),以便添加

    img{
        width: 100%
    }
    

    有了这张桌子就会适应宽度

    【讨论】:

      猜你喜欢
      • 2016-01-26
      • 2015-08-08
      • 1970-01-01
      • 2022-01-22
      • 2019-09-19
      • 2014-04-25
      • 2021-08-20
      • 2016-07-10
      • 1970-01-01
      相关资源
      最近更新 更多