在表格上拉伸背景图像';s td使用html/css

在表格上拉伸背景图像';s td使用html/css,html,css,image,html-table,stretch,Html,Css,Image,Html Table,Stretch,我有一张桌子,想要在TD的整个宽度上拉伸一个特定的背景,不管它的宽度是多少 我对相关的td的CSS当前是这样的: .tools .theader { margin:1px;background-color:#ffffcc; background:url(../images/td_bg.png) no-repeat center center; } <table class'tools'> <tr> <td class='theader' colspan=2>

我有一张桌子,想要在TD的整个宽度上拉伸一个特定的背景,不管它的宽度是多少

我对相关的
td
的CSS当前是这样的:

.tools .theader
{
margin:1px;background-color:#ffffcc;
background:url(../images/td_bg.png) no-repeat center center;
}
<table class'tools'>
<tr>
<td class='theader' colspan=2>
Background
</td>
...
HTML是这样的:

.tools .theader
{
margin:1px;background-color:#ffffcc;
background:url(../images/td_bg.png) no-repeat center center;
}
<table class'tools'>
<tr>
<td class='theader' colspan=2>
Background
</td>
...

背景
...
下面是我从结果中得到的图像:


因此,您可以看到蓝色斜面背景正好位于每个
td
的中心。我想让它伸展到
td
的边缘,这样整个
td
看起来是斜角的。如何做到这一点?

您可以改用css渐变

HTML

<table class'tools'>
<tr>
<td class='theader' colspan="2">
    <span>Background</span>
</td>
    </tr>
    </table>

是生成CSS渐变的最佳工具