【问题标题】:Why is my table background image not showing in wordpress?为什么我的表格背景图片没有在 wordpress 中显示?
【发布时间】:2011-09-28 06:17:40
【问题描述】:

为什么我的表格行背景图片没有出现在 Wordpress 中。

主题的样式表是否以某种方式抑制它,如果是这样,如何覆盖它以使图像显示,或者是否有其他错误导致它不显示?

请注意,表中的其他图像确实显示正确,因此文件的路径似乎可以正常工作。

<table width="250" height="200" cellpadding="0" cellspacing="0" border="1">
<tr>
    <td WIDTH="250" HEIGHT="82" colspan="3"><img src="/wp-content/plugins/xxxxxxwidget/image1.png">
        </td>
</tr>
<tr>
    <td style="background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;" WIDTH="250" HEIGHT="45" colspan="3">
        </td>
    </tr>
</table>

有什么建议吗?

【问题讨论】:

  • 如果没有所有代码,很难说问题出在哪里。您是否有公开可见的网站供我们检查?如果没有,你能把你的代码粘贴到JSFiddle吗?
  • 表格单元格的background-image 是否出现在trbackground-image 上方?你试过在tds 上设置background-color: transparent; 吗?

标签: html wordpress image html-table


【解决方案1】:

position:absolute; 添加到您的表格样式中。

【讨论】:

    【解决方案2】:

    改变

    background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;
    

    background:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;
    

    【讨论】:

      猜你喜欢
      • 2013-07-17
      • 2015-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-24
      • 1970-01-01
      相关资源
      最近更新 更多