3

背景画像がメーラーに表示されないという問題があります。なぜこれが起こるのか誰か教えてください。

   <table border="0" cellpadding="0" cellspacing="0" height="489" width="638" align="left" background="http://www.bla.com/images/email-bg.jpg">

テーブルの背景画像の上にテキストを重ねるためのネストされたテーブルを使用した完全なセットアップを次に示します。

  <table border="0" cellpadding="0" cellspacing="0" height="489" width="638" align="left" background="images/email-bg.jpg">
     <tr>
            <td valign="top" align="left">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left" valign="top" width="100%" style="font-family: Arial, sans-serif; font-size:12px; color:#585858; padding:35px 230px 0 40px">
                            <p style="font-size:28px; color:#474747">Welcome to <b>bla bla</p>
                            <p style="font-weight:bold; margin-bottom: 4px;">Just click the link below to finish your registration:</p>
                            <a href="#">Continue</a>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" width="100%" style="font-family: Arial, sans-serif; font-size:10px; color:#FFF; padding:80px 120px 0 40px">
                            <p style="margin-bottom:0">** Please do not reply to this automated message. The Email box that sent the message is not monitored.**</p>
                        </td>
                    </tr>

                </table>
            </td>
        </tr>
    </table>

更新されたコード

スタイル属性を使用する代わりにこれを使用するようにコードを変更しました

<table border="0" cellpadding="0" cellspacing="0" height="489" width="638" align="left" style="background-image:url(http://www.bla.com/images/email-bg.jpg)">

これは Apple メール クライアントでは機能しますが、Outlook では機能しません。Outlookに対する答えを知っている人はいますか?

4

4 に答える 4

4

ほとんどの電子メール クライアントは背景画像を表示しません。無地の色を使用してください。またはいくつかの回避策。

于 2012-07-24T17:06:22.120 に答える
3

表および表のセルの背景画像は、Outlook 2007 および Outlook 2010 ではレンダリングできません。

vml ハックを使用する

<td align="center" bgcolor="#ffffff" style="border-bottom:1px solid #000; border-top:1px solid #000;" valign="middle" background="image_name.jpg">
<!-- EMAIL CONTENT STARTS HERE -->
                <!--[if gte mso 9]>
            <v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" 

    style='behavior: url(#default#VML); display:inline-block; position:absolute; height:250px; width:600px; top:0; left:0; border:0; z-index:1;' src="image_name.jpg"/>
                <v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style='behavior: url(#default#VML); display:inline-block; position:absolute; height:250px; width:600px; top:-5; left:-10; border:0; z-index:2;'>
             <![endif]-->
    <table>
    <tr><td>CONTENT HERE</td></tr>

    </table>

<!-- EMAIL CONTENT ENDS HERE -->
                <!--[if gte mso 9]>
            </v:shape>
            <![endif]-->

高さと幅が正しく、動作することを確認してください

于 2013-04-24T18:48:23.183 に答える
0

これを試してください:コードに関連情報を入力し、画像を背景にしたい場所に配置します。

于 2013-02-21T20:10:54.000 に答える
-1

http://domain/pathbase href が設定されていない限り、メール クライアントは参照しているドメインを認識できないため、イメージ パスにはパス全体 ( ) が含まれている必要があります。

于 2012-07-24T17:06:05.980 に答える