我做了一个简单的HTML页面,其上显示图像作为标题。问题是图像不重复。背景重复不起作用
当我将width
设置为100%
时,td(side
)消失。 如果我从basestrip
删除width
,那么它只覆盖屏幕区域的一半。我想要覆盖具有指定高度的图像的所有屏幕。
<table cellpadding="0" cellspacing="0">
<tr>
<td id="side" width="10px" height="25px"></td>
<td></td>
<td id="basestrip" width="100%" height="25px">
</td>
</tr>
</table>
这是CSS:
#side {
background-color: #014160;
}
#basestrip {
background-image: url('../Images/topstripbg.png');
background-repeat: repeat-x;
}
财产你尝试过将背景图像到'tr'元素,而不是'td'? – Aaron 2011-12-21 06:11:44
你在布置一个使用表格的网站?另外,给#basetrip宽度为90%,#宽度为8%,看看侧面是否停留。 – Indranil 2011-12-21 06:13:55
也检查图像路径是否正确,可能是它没有加载图像.. – 2011-12-21 06:18:24