【问题标题】:css background image not showing upcss背景图片不显示
【发布时间】:2011-11-06 09:35:20
【问题描述】:

我不明白为什么这个背景图片没有显示出来。似乎图像正在发送到浏览器,并且正在应用 css 规则。

当我检查元素时,我会得到这些匹配的规则。当我单击“images/o.png”链接时,它会向我显示预期的图像 .player1_move { 宽度:30px; 高度:30px; 背景图片: url('images/o.png'); }

-----------下面是我拥有的css和html ---------

  .player1_move {
    width: 30px;
    height: 30px;
    background-image: url('images/o.png');
  }

 <table>
  <tr>
    <td id = "0-0" class="player1_move"></td>
  </tr>
 </table>

【问题讨论】:

    标签: html css


    【解决方案1】:

    我的猜测是你的单元格是空的,这就是它没有显示的原因。

    在你的 CSS 中添加这个:

    table{
        empty-cells: show;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-06
      • 2023-04-05
      • 1970-01-01
      • 2020-03-08
      • 2021-05-29
      • 2020-09-11
      相关资源
      最近更新 更多