gmail显示HTML电子邮件签名的方式有所不同 [英] HTML e-mail signature is disaplayed differently by gmail

查看:112
本文介绍了gmail显示HTML电子邮件签名的方式有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Thunderbird作为我的主要工作邮件客户端.我刚刚创建了一个新的HTML签名,该签名可以在Thunderbird,Opera和在线HTML Viewer中正确显示,但不能在GMail上正确显示.如果有人能指出问题的所在,我将不胜感激.我已经附加了.html签名文件.

I am using Thunderbird as my primary work mail client. I have just created a new HTML signature, which shows correctly in the Thunderbird, in Opera and in an online HTML Viewer but not on GMail. I would be very grateful if anyone could point me in the direction of what the problem is about. I have attached the .html signature file.

我意识到我没有指定问题:当我在GMail Web收件箱上检查Opera中的元素时,我看到整个文本的格式设置为Arial,12.8 px,同时在第一行上丢失了其他颜色(类= .name).

I realized that I didn't specify the problem: when I inspect the elements in Opera on the GMail web inbox I see that the whole text is formated to Arial, 12.8 px while losing the different color on the first line (class = .name).

我的CSS非常生锈,所以我怀疑错误就在我这边...

My CSS is very rusty so I suspect the error is on my side...

以下代码由蒂姆·格哈德(Tim Gerhard)更正(非常感谢!)

EDIT 2: code below as corrected by Tim Gerhard (thanks a lot!)

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <style type="text/css">
      .normal{font-family:"Arial"; font-size:9pt; line-height:1.25; color:#606060; font-weight:400}
      .name{font-size:10.5pt; color:rgb(119,187,65); font-weight:700;}
      .link{color:rgb(17,85,204)}
    </style>
  </head>
  <body>
    <div class="normal">
      <span class="name">Rostislav Janda</span></br>
      Obchodní zástupce</br></br>
      <a style="link"; href="tel:+420%20721%20604%20707" value="+420721604707" target="_blank">+420 721 604 707</br>
      <a style="link"; href="http://www.iqbudovy.cz"> www.iqbudovy.cz</a>
      </br></br>
      IQ Budovy s.r.o.</br>
      <a style="link"; href="[map link]">Mečířova 5, 612 00 Brno</a></br></br>
      <img alt="IQ_Logo" src="[image address]">
      <br><br><br>
    </div>
  </body>
</html>

推荐答案

您可以使用内联样式来对电子邮件进行样式设置,因为不完全支持类名(就我而言).使用style="color:red"代替类.内联应该与每个Mail程序一起使用.

You can use inline stylings to style your E-Mail as classnames aren't fully supported (as far as I', concerned). Use style="color:red" instead of classes. Inline should work with every Mail program.

 

您的html充满了可能导致此问题的错误.

Your html was full of errors which probably caused the issue.

我花了点时间修复它,这是(现在是正确的)标记:

I took the time to fix it and this is the (now correct) markup:

<html>

  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <style type="text/css">
      .normal {
        font-family: "Arial";
        font-size: 9pt;
        line-height: 1.25;
        color: #606060;
        font-weight: 400;
      }

      .name {
        font-size: 10.5pt;
        color: rgb(119, 187, 65);
        font-weight: 700;
      }

      .link {
        color: rgb(17, 85, 204);
      }

    </style>
  </head>

  <body>
    <div class="normal">
      <span class="name">Rostislav Janda</span><br/>
      Obchodní zástupce<br/>
      <br/>
      <a class="link" href="tel:+420%20721%20604%20707" value="+420721604707" target="_blank">+420 721 604 707</a><br/>
    <a class="link" href="http://www.iqbudovy.cz"> www.iqbudovy.cz</a>
      <br/>
      <br/>
      IQ Budovy s.r.o.<br/>
      <a class="link" href="[map link]">Mečířova 5, 612 00 Brno</a><br/>
      <br/>
      <img alt="IQ_Logo" src="[image address]"/>
      <br><br><br>
    </div>
  </body>
</html>

怎么了?

  • 您使用<br>标记错误.是<br/>而不是</br>
  • 您的一个图片标签未正确关闭
  • 您的一个超链接(<a>)未关闭
  • 您使用style ="而不是class ="
  • You use the <br> tag wrong. It's <br/> and not </br>
  • One of your image tags was not closed properly
  • One of your hyperlinks (<a>) was not closed
  • You use style="" instead of class=""

这篇关于gmail显示HTML电子邮件签名的方式有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆