2015-09-03 2 views
1

Я не могу получить фоновое изображение для работы в бюллетене Outlook HTML. Я попробовал пуленепробиваемый метод, но он не работает так, как должен!Информационный бюллетень разрушен в Outlook

Пожалуйста, проверьте мой код, чтобы узнать, есть ли у вас идеи, как правильно отображать 3 разных фоновых изображения в Outlook. Это то, что у меня есть на данный момент (и это работает безупречно везде, но перспектива)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
    <head> 
     <title>E-mail newsletter</title> 
     <meta content="text/html; charset=utf-8" http-equiv="Content-Type">    
     <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" name="viewport"> 
     <style type="text/css"> 

/* Reset */ 
body { margin: 0px; padding: 0px; background-color: #FFFFFF; } 

::selection { 
background: #ff2f2f; /* WebKit/Blink Browsers */ 
} 
::-moz-selection { 
background: #ff2f2f; /* Gecko Browsers */ 
} 

/* Responsive */ 
@media only screen and (max-width:600px) { 

/* Tables 
parameters: width, alignment, padding */ 

table[class=scale] { width: 100%!important; } 
table[class=scale-300] { width: 100%!important; height: 300px!important; } 
table[class=scale-90] { width: 90%!important; } 

/* Td */ 
td[class=hide] { display: none!important; height: 0px!important; } 
td[class=scale-left] { width: 100%!important; text-align: left!important;} 
td[class=scale-height] { height: 70px!important;} 
td[class=scale-left-bottom] { width: 100%!important; text-align: left!important; padding-bottom: 24px!important; } 
td[class=scale-left-top] { width: 100%!important; text-align: left!important; padding-top: 24px!important; } 
td[class=scale-left-all] { width: 100%!important; text-align: left!important; padding-top: 24px!important; padding-bottom: 24px!important; } 
td[class=scale-center] { width: 100%!important; text-align: center!important;} 
td[class=scale-center-both] { width: 100%!important; text-align: center!important; padding-left: 20px!important; padding-right: 20px!important; } 
td[class=scale-center-bottom] { width: 100%!important; text-align: center!important; padding-bottom: 24px!important; } 
td[class=scale-center-top] { width: 100%!important; text-align: center!important; padding-top: 24px!important; } 
td[class=scale-center-all] { width: 100%!important; text-align: center!important; padding-top: 24px!important; padding-bottom: 24px!important; padding-left: 20px!important; padding-right: 20px!important; } 
td[class=scale-right] { width: 100%!important; text-align: right!important;} 
td[class=scale-right-bottom] { width: 100%!important; text-align: right!important; padding-bottom: 24px!important; } 
td[class=scale-right-top] { width: 100%!important; text-align: right!important; padding-top: 24px!important; } 
td[class=scale-right-all] { width: 100%!important; text-align: right!important; padding-top: 24px!important; padding-bottom: 24px!important; } 

td[class=scale-center-bottom-both] { width: 100%!important; text-align: center!important; padding-bottom: 24px!important; padding-left: 20px!important; padding-right: 20px!important; } 
td[class=scale-center-top-both] { width: 100%!important; text-align: center!important; padding-top: 24px!important; padding-left: 20px!important; padding-right: 20px!important; } 
td[class=reset] { height: 0px!important; } 
td[class=scale-center-topextra] { width: 100%!important; text-align: center!important; padding-top: 84px!important; } 

img[class="reset"] { display: inline!important; } 
img[class="scale-80"] { width: 80%!important; } 

} 


    </style> 
</head> 
<body> 

<table class="scale" data-bgcolor="Body BG" data-module="Header" style="background-color: rgb(255, 255, 255); position: relative; opacity: 1; top: 0px; left: 0px;" align="center" border="0" cellpadding="0" cellspacing="0" width="100%"> 

    <tr> 
          <td align="center" style="color:#444444; font-family:Helvetica, Verdana, Arial, sans-serif; font-size:13px; padding:50px 0px 20px 0;"> 
           Can't see the offer? Click <a href="http://webpage.com" style="color: rgb(219, 0, 19);">here</a>!        </td> 
         </tr>  
    <tr> 
     <td> 
      <table class="scale" style="background-size: cover; background-position: 50% 50%; background-repeat: no-repeat no-repeat; background-image: url(&quot;http://s30.postimg.org/s36pgisoh/bg1.jpg&quot;);" data-bg="Quote BG" align="center" height="340" background="http://s30.postimg.org/s36pgisoh/bg1.jpg" border="0" cellpadding="0" cellspacing="0" width="620"> 
       <tr> 
        <td style="background-position: 50% 100%; background-repeat: no-repeat no-repeat;" height="50" background="http://s10.postimg.org/u2e99laih/cut_top.png"> 
         &nbsp;      </td> 
       </tr> 
       <tr> 
        <td align="center"> 
         <table class="scale" align="center" border="0" cellpadding="0" cellspacing="0" width="500"> 
          <tr> 
           <td height="50"> 
            &nbsp;         </td> 
          </tr> 

          <tr> 
           <td data-color="Header Headline" data-max="64" data-min="16" data-size="Header Headline" style="font-family: &quot;Proxima N W01 At Smbd&quot;,Helvetica,Arial,sans-serif; font-size: 29px; color: rgb(255, 255, 255); line-height: 42.05px;" align="center">BEST OFFER HERE!<br><br><span data-color="Header Subline" data-max="50" data-min="16" data-size="Header Subline" style="font-size: 38px; line-height: 38px; color: rgb(255, 255, 255);">STARTS FROM <strong>35 EUR</strong>!</span> 
           </td> 
          </tr> 
          <tr> 
           <td height="40"> 
            &nbsp; </td> 
          </tr> 
          <tr> 
           <td style="color: rgb(255, 255, 255); font-size: 15px; line-height: 25.5px;" data-color="Header Button" data-max="28" data-min="14" data-size="Header Button" align="center"><a data-color="Header Button" data-max="28" data-min="14" data-size="Header Button" data-bgcolor="Header Button" href="http://webpage.com" style="background-color: rgb(219, 0, 19); border-radius: 40px; padding: 10px 30px; color: rgb(255, 255, 255); font-family: &quot;Proxima N W01 At Smbd&quot;,Helvetica,Arial,sans-serif; text-decoration: none; font-size: 15px; line-height: 25.5px;">ORDER NOW&nbsp;<img src="http://s11.postimg.org/nk238dn6n/nool.png" height="10px" width="11px" alt=""></a> 
           </td> 
          </tr> 
          <tr> 
           <td height="50"> 
            &nbsp;         </td> 
          </tr> 
         </table> 

        </td> 
       </tr> 
       <tr> 
        <td style="background-position: 50% 100%; background-repeat: no-repeat no-repeat;" height="50" background="http://s27.postimg.org/f9g57wpgz/cut_down.png"> 
         &nbsp;      </td> 
         </td> 
          </tr> 
         </table></tr> 
      </table></body></html> 


                                   </body></html> 
+0

'Фоновое изображение: URL (" http://s30.postimg.org/s36pgisoh/bg1.jpg "); "'вы должны сделать это' '" обратно'"' – Sharky

+0

Нет извините, я уже попробовал это :) Это не так просто. – user5295320

+0

вы можете обновить свой вопрос и включить то, что вы уже пробовали. – Sharky

ответ

1

background-image не поддерживается в мировоззрении, извините за вас.

Посмотрите здесь о совместимости CSS в почтовых клиентах: https://www.campaignmonitor.com/css/

Использование HTML и CSS в сообщениях электронной почты это очень и очень сложно. Каждый клиент электронной почты, читающий вашу электронную почту, будет иметь свои собственные правила о том, как он относится к электронным письмам HTML, поэтому вам придется разрабатывать для самого низкого общего знаменателя.

+2

Просто чтобы добавить к этому лучший инструмент, который я видел для тестирования электронных писем у большинства клиентов, это http://www.litmus.com – lharby

+1

http://premailer.dialect.ca/ - хорошая проверка отправки. В прошлый раз, когда мне приходилось делать HTML-письмо, я должен был разместить ВСЕ встроенный CSS, чтобы заставить его работать последовательно (например, вообще не использовать классы). Ввод этого встроенного решения решает большинство проблем, с которыми я столкнулся, кроме неподдерживаемых функций, таких как «background-image» для этого примера. – Lyall

Смежные вопросы