Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在后台添加图像,outlook问题_Outlook_Html Email - Fatal编程技术网

在后台添加图像,outlook问题

在后台添加图像,outlook问题,outlook,html-email,Outlook,Html Email,在标题上有类似的问题。有电子邮件模板,一切正常,但背景图像在outlook上不起作用。不幸的是,我国大多数人都使用它。下面是我的代码: <!--@subject Email - Header @--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://

在标题上有类似的问题。有电子邮件模板,一切正常,但背景图像在outlook上不起作用。不幸的是,我国大多数人都使用它。下面是我的代码:

    <!--@subject Email - Header @-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, width=device-width" />
</head>
<body>
{{var non_inline_styles}}

<!-- Start Image Background -->
<table class="image-background" cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="22262b" background="http://met.ivycommerce.eu/glamoura_main_image.jpg">
    <tr>
        <td class="image-background" align="center" style="background: url('http://met.ivycommerce.eu/pattern.png') 0 0 repeat">
            <table class="container-table" cellpadding="0" cellspacing="0" border="0">           
                <tr>
                    <td class="separator-50" height="50">&nbsp;</td>
                </tr>

                <!-- Start Three Column -->

                <tr>
                    <td>
                        <table class="container-table" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td class="center" align="center">
                                    <a href="{{store url=""}}">
                                        <img style="display: block; margin: 0 auto;"
                                            {{if logo_width}}
                                            width="{{var logo_width}}"
                                            {{else}}
                                            width="165"
                                            {{/if}}

                                            {{if logo_height}}
                                            height="{{var logo_height}}"
                                            {{else}}
                                            height=""
                                            {{/if}}

                                            src="{{var logo_url}}"
                                            alt="{{var logo_alt}}"
                                            border="0"/>
                                    </a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <!-- Start Three Column -->
                <tr>
                    <td class="separator-30" height="30">&nbsp;</td>
                </tr>
                <tr>
                    <td align="center">
                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="60">
                            <tr>
                                <td class="separator-line" bgcolor="#ffffff" height="1">&nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="separator-30" height="30">&nbsp;</td>
                </tr>
                <tr>
                    <td class="colored-heading" align="center" height="28">
                        <div style="line-height: 28px;">Nasza Misja</div>
                    </td>
                </tr>
                <tr>
                    <td class="heading" align="center" height="28">
                        <div style="line-height: 28px;">To uśmiechnięci Klienci</div>
                    </td>
                </tr>
                <tr>
                    <td class="separator-10" height="10">&nbsp;</td>
                </tr>
                <tr>
                    <td class="sub-heading" align="center" height="24">
                        <div style="line-height: 24px;">Dziękujemy, że dołączyłeś do wielkiego grona Bionaturalnych.</div>
                    </td>
                </tr>


                <tr>
                    <td class="separator-50" height="50">&nbsp;</td>
                </tr>
                <tr>
                    <td align="center">
                        <table align="center" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="button" align="center" valign="middle" height="38" width="140">
                                    <a href="{{store url=""}}">Wejdź Do Sklepu</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="separator-50" height="50">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<!-- End Image Background -->

<!-- Begin wrapper table -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="background-table">
    <tr>
        <td valign="top" class="container-td" align="center">
            <table cellpadding="0" cellspacing="0" border="0" align="center" class="container-table">
                <tr>
                    <td valign="top" class="top-content">
                    <!-- Begin Content -->

{{var non_inline_styles}}
纳斯扎米萨酒店
致uśmiechnięci Klienci
Dziękujemy,że doączyśe do wielkiego grona biosnaturalnych。

我尝试了一些代码,但没有成功:(当背景正常时,其余部分向左对齐,但必须居中。有人能帮我吗?

Outlook通常需要老式的编程,并且有许多电子邮件中不允许的内容,而网站编程中允许这些内容。这意味着当标题中包含样式时效果最好,并且不能使用背景图像。如果要使用背景图像(例如,在标题后面),则需要将标题和背景创建为单个图像,以便像插入任何其他图像一样插入。这样做的缺点是,除非用户指定,否则Outlook不会下载图像。由于大多数用户都使用Outlook,因此最佳做法是使用progr下面是邮件服务提供商Mailchimp发现的与Outlook有关的问题列表,以及可以执行的修复程序(如果可用)

在查看提供的代码时,我认为您可能需要考虑以下几点:

  • 使用固定的测量值而不是百分比
  • 使用1px x 1px透明或背景色的图像,而不是使用代码来设置间距,您可以调整图像的高度和宽度,以使空间按您想要的方式工作
  • 以css格式将所有样式置于顶部,例如:

    <style type="text/css">
        body{
            margin:0;
            padding:0;
            font-family:"Trebuchet MS", arial, sans-serif;
        }
    
    </style></head>
    
    
    身体{
    保证金:0;
    填充:0;
    字体系列:“投石机MS”,arial,无衬线;
    }
    
我编写电子邮件时事通讯已经快十年了,当大多数用户都使用Outlook时,最简单、最基本的代码效果最好。最后,我建议您始终通过html验证程序运行代码,例如检查代码。即使是最小的错误也可能导致Outlook或oth出现意外结果er浏览器。

Zydol,
要实现这一点,您需要使用VML创建一个对象并将背景图像分配给该对象。您可以在此处阅读有关此技术的更多信息:

我相信防弹背景是您要寻找的答案