内联样式导致错误

Cha*_*erj 2 html css

为什么这种内联样式会导致错误?我正在使用intelij作为我的IDA,而且它的价值无效style="background-image:url(../images/email-bg.jpg);"

<table border="0" cellpadding="0" cellspacing="0" height="489" width="639" align="left" style="background-image:url(../images/email-bg.jpg);">
Run Code Online (Sandbox Code Playgroud)

我使用内联样式的原因是因为我正在做一个HTML电子邮件.

sac*_*een 6

当您将此电子邮件发送给人们时,会../images/email-bg.jpg指向哪里?

您需要使用绝对路径.这样的东西http://yoursite.com/images/email-bg.jpg无论你在哪里看它都会指向你的形象.