0

我正在构建一个 html 电子邮件程序,并且试图让我的包装表显示背景图像,以便我的内部表格可以将文本覆盖在其顶部,但它不会在包装器上显示背景图像。

 <table border="0" cellpadding="0" cellspacing="0" height="489" width="639" align="left" style="background-image:url(../../images/email-bg.jpg); width:639px; height:489px">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td align="left" style="font-family: Arial, sans-serif; font-size:10px; color:#477398 "><h1>This is my title text</h1></td>
                <td colspan="2" align="left" style="font-family: Arial, sans-serif; font-size:10px; padding:10px 0 5px 2px; text-decoration:underline; color:#808184 "><a href="#">Continue</a></td>
            </tr>
        </table>
    </table>
4

1 回答 1

1

试试这个,

<table border="0" cellpadding="0" cellspacing="0" height="489" width="639" align="left" >
<tr>
<td style="background-image:url(../../images/email-bg.jpg); width:639px; height:489px">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td align="left" style="font-family: Arial, sans-serif; font-size:10px; color:#477398 "><h1>This is my title text</h1></td>
                <td colspan="2" align="left" style="font-family: Arial, sans-serif; font-size:10px; padding:10px 0 5px 2px; text-decoration:underline; color:#808184 "><a href="#">Continue</a></td>
            </tr>
        </table>
</td>
</tr>
    </table>

请检查您的第一个表没有 tr 和 td 元素。

于 2012-07-17T16:53:58.597 回答