2013-10-14 44 views
0

我的代码:的Gmail覆盖字体颜色

<tr> 
    <td align="center" style="font-size:9pt; font-weight : bold;font-family:Arial; color:black;"> 
      SELLE ZETA CONFORT GEL 
    </td> 
</tr> 

当我不同的邮件客户端上的尝试,文字是黑色的,但在Gmail(资源管理器中,Chrome和Firefox)这段文字是蓝色的。 我该如何解决这个问题?

如果你想寻找一个为例: http://issl.fr/test/test_validator.html 采取所有代码的HTML,并将其复制有: https://litmus.com/email-testing 你将能够有每个客户端上的预览。看一下gmail。

回答

0

在电子邮件中,您必须使用6位十六进制代码来实现跨电子邮件客户端的最大兼容性。使用CSS文本即:color:#000000;,和HTML的bgcolor="#FFFFFF"为背景

3

因为你的文字是坐在一个<a>标签(您<a>与您的文字环绕表中的话)。这就是为什么你的文字变成了蓝色。给你的<a>涂一个颜色,那应该可以解决这个问题......约翰是正确的使用正确的十六进制代码的颜色。

同样,即使您声明它应该是color:#000000,Gmail也希望在指向默认蓝色的链接上更改color:#000000。使用color:#000001。这将解决它。

+1

这是正确的答案。 Gmail会将蓝色链接换成黑色链接。如上所示使用#000001。 – GhostInTheSecureShell

0

用gmail你需要在你的颜色上多余。

您不仅需要在其中声明颜色,还应该用颜色将其包装在一个范围中。

这是下面正确的代码

<Track Link> 
            <a style="text-decoration : none; color:#000000;" href="http://www.decathlon.be/selle-zeta-confort-gel-id_8052361.html"> 
             <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> 
              <tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> 
                <tr height="3"></tr><tr style="height : 32px !important; min-height : 32px !important; max-height : 32px !important; "> 
                 <td width="6"></td> 
                 <td align="left"> 
                  <div style="height :32px !important; min-height : 32px !important; max-height : 32px !important; "></div> 
                 </td> 
                 <td width="58"></td> 
                 <td align="right"> 
                  <div style="height :32px !important; min-height : 32px !important; max-height : 32px !important; "><img border="0" style="display:block;" width="64" height="32" alt=" " src="http://decathlonbe.net/images/Marques/geonaute.png"></div> 
                 </td> 
                 <td width="6"></td> 
                </tr><tr height="1"></tr> 
               </tbody></table> 
              </td></tr> 
              <tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> 
                <tr> 
                 <td align="center"> 
                  <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> 
                   <tr> 
                    <td width="5"></td> 
                    <td><img width="188" border="0" alt="" src="http://www.decathlon.be/media/805/8052361/classic_400PX_asset_71685950.jpg" style="display : block;"></td> 
                    <td width="5"></td> 
                  </table> 
                 </td> 
                </tr> 
                <tr> 
                 <td align="center" style="font-size:9pt; font-weight : bold;font-family:Arial; color:black;"><span style="color:#000000;">SELLE ZETA CONFORT GEL</span></td> 
                </tr> 
                <tr> 
                 <td align="center" style="font-size:9pt; font-family:Arial; color:#6f6f6f;"></td> 
                </tr> 
               </tbody></table> 
              </td></tr><tr><td> 
               <div class="price" style="font-family : Arial; font-size : 22pt; color : black; text-align : center;"><div class="nopromo" style="font-weight:bold;font-family : Arial; font-size : 19pt; color : black; text-align : center;">29<sup style="font-size:12pt;">&#128;95</sup></div></div> 
              </td></tr><tr><td> 
               <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> 
                <tr> 
                 <td width="15"></td> 
                 <td valign="middle" align="center"> 
                  <Track Link><a style="text-decoration : none; font-family : Arial; font-weight : bold; font-size : 11pt; color : white;" href="http://www.decathlon.be/selle-zeta-confort-gel-id_8052361.html"><table align="center" cellspacing="0" cellpadding="0" border="0" style="background : #efefef;" > 
                    <tr height="32" style="background-color : #FF7100;"> 
                     <td width="5" ><span style="color: #FF7100;">i<span></td> 
                     <td style = "max-width: 144px;"> <div style="color : white;text-align:center; font-size : 10pt;font-family:Arial;font-weight: bold; ">sefsefse </div></td> 
                     <td style="padding-left : 5px;"> 
                      <span style="color : white; font-weight : bold; font-size : 12pt;"> > </span> 
                     </td> 
                     <td width="5"><span style="color: #FF7100;">i</span></td> 
                    </tr> 
                   </table> 
                  </a></Track Link> 
                 </td> 
                 <td width="15"></td> 
                </tr> 
                <tr height="8"></tr> 
               </tbody></table>  
              </td></tr> 
             </tbody></table> 
           </a> 
0

达里尔沃斯的答案是正确的项目之一。

我用颜色链接#00001在电子邮件中始终实现黑色链接。

我在一家机构工作,没有人抱怨过它看起来不黑。