私は前にこれをやったことがあります。これが私が思いついた大まかなコードです:
CSS
table th.first-column {
background: url(images/layout/tb_left.png) 0 0 no-repeat;
}
table th {
height: 26px;
background: url(images/layout/tb_bg.png) 0 0 repeat-x;
}
/* Had some issues across browsers just putting the image in the <th>, had to use a span */
table th.last-column span {
display: block;
height: 26px;
background: url(images/layout/tb_right.png) 100% 0 no-repeat;
}
HTML
<table width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="first-column"><span>Column 1</span></th>
<th><span>Column 2</span></th>
<th><span>Column 3</span></th>
<th class="last-column"><span>Column 4</span></th>
</tr>
</thead>
<tbody>
<tr>
...
</tr>
</tbody>
<tfoot>
<tr>
...
</tr>
</tfoot>
</table>
次に、それに応じて画像を作成するだけで、すべて問題ありません。私の最初と最後の列の画像は、幅が数百ピクセルで、最初の左側のエッジが丸く、最後の列の右側のエッジが丸くなっています。中央の背景画像はちょうど 1x26 ピクセルで、x 軸に沿って繰り返されます。