2017-09-22 83 views
0

是否有任何可能的方式在HTML Outlook電子郵件簽名的文本背後顯示背景圖片。我在網上查了一些資源,有些建議使用VML標籤,我試過也沒有用。是否可以使用補丁或解決方法爲簽名的主表使用背景圖像。Outlook Html簽名:背景圖片

<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; width: 1705px; height: 356px; background-image: url(signature.jpg); background-repeat: repeat-y;" background="signature.jpg"> 
<tr> 
    <td valign="top"> 
     <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;"> 
      <tr> 
       <td valign="top" style="padding-left:140px; padding-top:50px;"> 
        <span style="color:#000000; font-size:22px; line-height: 20px; font-weight:bold; font-family:calibri"><b>Name</b></span><br> 
        <span style="color:#000000; font-size:20px; font-family:calibri">Consultant</span><br><br> 
        <span style="color:#000000; font-size:20px; font-family:calibri">P.O.Box Location</span><br> 
        <table cellpadding="0" cellspacing="0" style="border-collapse: collapse;"> 
         <tr> 
          <td valign=top> 
           <span style="color:#000000; font-size:20px; font-family:calibri"><strong>T:</strong></span> 
           <span style="color:#000000; font-size:20px; font-family:calibri">+001-123-456</span> 
           <br> 
           <span style="color:#000000; font-size:20px; font-family:calibri"><strong>D:</strong></span> 
           <span style="color:#000000; font-size:20px; font-family:calibri">+001-123-456&nbsp;</span> 
           <br> 
           <span style="color:#000000; font-size:20px; font-family:calibri"><strong>E:</strong></span> 
           <a href="mailto:[email protected]" target="_blank" style="color:#000000; text-decoration:none;"> 
            <span style="color:#000000; font-size:20px; font-family:calibri">[email protected]</span> 
           </a> 
          </td> 
          <td valign=top style='padding-left:20px'> 
           <span style="color:#000000; font-size:20px; font-family:calibri"><strong>M:</strong></span> 
           <span style="color:#000000; font-size:20px; font-family:calibri"></span> 
           <br> 
           <span style="color:#000000; font-size:20px; font-family:calibri"><strong>F:</strong></span> 
           <span style="color:#000000; font-size:20px; font-family:calibri;">+971 4 367 2892</span> 
          </td> 
         </tr> 
        </table> 
       </td> 
      </tr> 
     </table> 
    </td> 
</tr> 

回答

1

電子郵件發展不是前端開發。

讓背景圖像在Outlook中工作的唯一方法是使用vml代碼。我們其他人對此也不感興趣,但它是讓大多數版本的Outlook能夠使用背景圖像的唯一方法。

我測試此代碼在石蕊使用Outlook的每一個版本:

<div style="background-color:#ff0000; width:600px;"> 
 
    <!--[if gte mso 9]> 
 
    <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> 
 
    <v:fill type="tile" src="http://www.gwally.com/news/photos/catintinfoilhat.jpg" color="#ff0000"/> 
 
    </v:background> 
 
    <![endif]--> 
 
    <table height="450" width="600" cellpadding="0" cellspacing="0" border="0"> 
 
    <tr> 
 
     <td valign="top" align="left" background="http://www.gwally.com/news/photos/catintinfoilhat.jpg"> 
 
     <h1 style="text-align: center; color: #ffffff;-webkit-text-stroke-width: 1px; 
 
    -webkit-text-stroke-color: black; font-family: Arial, san-serif;"> 
 
     Background Image with text on top 
 
     </h1> 
 
     </td> 
 
    </tr> 
 
    </table> 
 
</div> 
 
<p> 
 
You can find most of this code at https://backgrounds.cm.</p> 
 

 
<p>That picture really is me and Canaille the cat.</p>

它不會在Outlook中的郵件10,它重複在2013年和2016年,這將部分工作在Gmail,AOL,雅虎,因爲他們不完全支持背景圖片。

如果你能想出一個辦法,使之在Outlook中工作,沒有VML,你會在電子郵件的世界英雄。

祝你好運。

+0

謝謝您的答覆。我試過你的解決方案,但我的問題是,我有一個PHP代碼在瀏覽器中生成簽名,以供用戶直接從瀏覽器複製粘貼到他們的Outlook Signature安裝程序,完成後仍未複製(顯示)甚至是使用VML代碼的背景圖片。有什麼建議麼? – TechMafioso

0

我一直在努力,最後我能做到。 Html文件在Outlook 2013中完美運行。享受它。

FINAL RESULT

 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head> 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} 
 
o\:* {behavior:url(#default#VML);} 
 
w\:* {behavior:url(#default#VML);} 
 
.shape {behavior:url(#default#VML);} 
 
</style><![endif]--><style><!-- 
 
/* Font Definitions */ 
 
@font-face 
 
    {font-family:"Cambria Math"; 
 
    panose-1:2 4 5 3 5 4 6 3 2 4;} 
 
@font-face 
 
    {font-family:Calibri; 
 
    panose-1:2 15 5 2 2 2 4 3 2 4;} 
 
@font-face 
 
    {font-family:Verdana; 
 
    panose-1:2 11 6 4 3 5 4 4 2 4;} 
 
/* Style Definitions */ 
 
p.MsoNormal, li.MsoNormal, div.MsoNormal 
 
    {margin:0in; 
 
    margin-bottom:.0001pt; 
 
    font-size:11.0pt; 
 
    font-family:"Calibri",sans-serif;} 
 
a:link, span.MsoHyperlink 
 
    {mso-style-priority:99; 
 
    color:#0563C1; 
 
    text-decoration:underline;} 
 
a:visited, span.MsoHyperlinkFollowed 
 
    {mso-style-priority:99; 
 
    color:#954F72; 
 
    text-decoration:underline;} 
 
span.EmailStyle17 
 
    {mso-style-type:personal-compose; 
 
    font-family:"Calibri",sans-serif; 
 
    color:windowtext;} 
 
.MsoChpDefault 
 
    {mso-style-type:export-only; 
 
    font-family:"Calibri",sans-serif;} 
 
@page WordSection1 
 
    {size:8.5in 11.0in; 
 
    margin:1.0in 1.0in 1.0in 1.0in;} 
 
div.WordSection1 
 
    {page:WordSection1;} 
 
--></style><!--[if gte mso 9]><xml> 
 
<o:shapedefaults v:ext="edit" spidmax="1027" /> 
 
</xml><![endif]--><!--[if gte mso 9]><xml> 
 
<o:shapelayout v:ext="edit"> 
 
<o:idmap v:ext="edit" data="1" /> 
 
</o:shapelayout></xml><![endif]--></head><body lang="EN-US" link="#0563C1" vlink="#954F72"><div class="WordSection1"><p class="MsoNormal"><o:p>&nbsp;</o:p></p><table class="MsoNormalTable" border="0" cellpadding="0" width="100%" style="width:100.0%"><tr style="height:225.0pt"> 
 
<td width="100%" style="margin-left:14px; width:100.0%;height:225.0pt"><p class="MsoNormal"><br><br><br><br><br> 
 
<span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> 
 
<a href="tel:+964%750%304%25%36" value="+9647503042536" target="_blank"> 
 
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#A2A2A2;text-decoration:none">+964 750 304 25 36</span></a><br> 
 
<span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> 
 
<a href="mailto:[email protected]" value="" target="_blank"> 
 
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#A2A2A2;text-decoration:none">[email protected]</span></a><br> 
 
<span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> 
 
<a href="https://wego.here.com/directions/mix/mylocation/e-eyJuYW1lIjoiTWVyYSBQaGFybWEgR21iSCIsImFkZHJlc3MiOiJCXHUwMGY2c2NoIFN0cmFzc2UgNzMsIDYzMzEgSFx1MDBmY25lbmJlcmcsIFp1ZywgU3dpdHplcmxhbmQiLCJsYXRpdHVkZSI6NDcuMTYxNzAxMiwibG9uZ2l0dWRlIjo4LjQ0MTAyOTUsInByb3ZpZGVyTmFtZSI6ImZhY2Vib29rIiwicHJvdmlkZXJJZCI6MjE5OTA3MzY4MTE5NDU0fQ==?map=47.1617,8.44103,15,normal&fb_locale=en_US" value="" target="_blank"><span style="padding-bottom: 20px; font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#A2A2A2;text-decoration:none">Get Direction</span></a> 
 

 
<br> 
 

 
    <span style="font-size:20.0pt;line-height:20pt; display:inline-block; text-align:left; display: block;"> 
 
<a href="https://www.linkedin.com/in/graphrapture/"><img src="http://merapharmagmbh.com/HTMAIL/inb.png" width="20" height="20"></a>&nbsp;&nbsp; 
 
<a href="https://twitter.com/MeraPharmaGmbH"><img src="http://merapharmagmbh.com/HTMAIL/tb.png" width="20" height="20"></a>&nbsp;&nbsp; 
 
<a href="https://www.facebook.com/Merapharmagmbh/"><img src="http://merapharmagmbh.com/HTMAIL/fb.png" width="20" height="20"></a>&nbsp;&nbsp; 
 
<a href="https://www.youtube.com/channel/UCTS42-L3V0wd-fobwi9nIVw?view_as=subscriber"><img src="http://merapharmagmbh.com/HTMAIL/utb.png" width="20" height="20"></a> 
 
</span> 
 

 
</span> 
 

 

 

 
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="[email protected]@[email protected]@[email protected]@[email protected]@5xe" filled="f" stroked="f"> 
 
<v:stroke joinstyle="miter" /> 
 
<v:formulas> 
 
<v:f eqn="if lineDrawn pixelLineWidth 0" /> 
 
<v:f eqn="sum @0 1 0" /> 
 
<v:f eqn="sum 0 0 @1" /> 
 
<v:f eqn="prod @2 1 2" /> 
 
<v:f eqn="prod @3 21600 pixelWidth" /> 
 
<v:f eqn="prod @3 21600 pixelHeight" /> 
 
<v:f eqn="sum @0 0 1" /> 
 
<v:f eqn="prod @6 1 2" /> 
 
<v:f eqn="prod @7 21600 pixelWidth" /> 
 
<v:f eqn="sum @8 21600 0" /> 
 
<v:f eqn="prod @7 21600 pixelHeight" /> 
 
<v:f eqn="sum @10 21600 0" /> 
 
</v:formulas> 
 
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> 
 
<o:lock v:ext="edit" aspectratio="t" /> 
 
</v:shapetype><v:shape id="Rectangle_x0020_2" o:spid="_x0000_s1026" type="#_x0000_t75" alt="http://www.merapharmagmbh.com/HTMAIL/sigbg.jpg" style='position:absolute;margin-left:-16.5pt;margin-top:0;width:427.5pt;height:135pt;z-index:-251657216;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;mso-height-relative:page'> 
 
<v:imagedata src="http://www.merapharmagmbh.com/HTMAIL/mrwt.jpg" o:title="sigbg" /> 
 
<o:lock v:ext="edit" aspectratio="f" /> 
 
</v:shape><![endif]--><![if !vml]><span style="display:inline-block; mso-ignore:vglayout;position:absolute;z-index:-1895824384;margin-left:-22px;margin-top:-150px;width:570px;height:180px"><img width="570" height="180" src="http://www.merapharmagmbh.com/HTMAIL/mrwt.jpg" alt="http://www.merapharmagmbh.com/HTMAIL/sigbg.jpg" v:shapes="Rectangle_x0020_2"></span><![endif]><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p></o:p></span></p></td></tr></table><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p></div></body></html>

+0

如果您希望某人真正閱讀它,請格式化並簡化此操作。如果您沒有手工輸入此代碼,請解釋您爲獲得該代碼所做的操作。 – chharvey