我无法在thead中设置背景图像。
HTML:
<div class="section4">
<div class="container">
<table class="mytable">
<thead>
<td class="f">F</td>
<td class="p">P</td>
<td class="e">E</td>
</thead>
.... snipped ....
如果我仅通过在CSS中设置背景颜色来开始工作,则可以:
thead .e {
color: #5fc98d;
background-color: #000000;
}
现在,一旦将CSS更改为以下内容,我什么也没得到:
thead .e {
color: #5fc98d;
background: url("img/ent-star.png") no-repeat;
}
仅供参考,图像应为50px X 50px的绿色星形。
你有没有尝试过
background: url("/img/ent-star.png") no-repeat;
background: url("../img/ent-star.png") no-repeat;
background: url("../../img/ent-star.png") no-repeat;
似乎您没有选择正确的路径
在这里查看工作演示:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句