混乱关于css编码标准的Html电子邮件通讯 [英] Confusion about css coding standards for Html Email newsletter

查看:131
本文介绍了混乱关于css编码标准的Html电子邮件通讯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编码电子邮件通讯。我已经看到一些关于好的电子邮件编码的指导。
i想要问关于电子邮件通讯的CSS代码,例如它的优先代码内联CSS,但对于一些自由模板,我发现这样的代码

i am coding Email newsletters. i have seen some guidelines regarding Good email coding.. i want to ask about css code for Email newsletters for example its preffered to code inline css but for some free templates i found code like this

       <style type="text/css">

       body { color:#000; background-color:#fff; font-family:Arial, Helvetica, sansserif; text-align:center; }
       h2 { color:#2255DB; font-size:16px; margin-top:15px; margin-bottom:0px; }        
       h2 a:link { text-decoration:none; }
      .footer { fontsize:11px; text-align:center; color:#2255DB; }// and son on 

       </style>

    <p class="footer" style="color:#2255DB;"> footer...</footer>//again style  tag

内置样式。

    <span style="font-weight: bold; width: 525px;">
    Lorem ipsum dolo
    </span><br><br>// and son on  ,,  

上面提到的代码都在电子邮件客户端工作良好
i也看到了Campaign监视器等标准,所以我困惑哪种风格更好..如果我们使用样式在上述代码和或在线编码,如果有人可以清除我这个..it将是非常大的赞成

Both the above mentioned codes are working fine in Email clients i have also seen standards from Campaign monitor etc, so i am confused which style is better .. should we use style in as in above mentioned code and or total inline coding , Please if someone can clear me about this ..it would be great favor

编辑
一次编码是否有任何免费服务,可以帮助检查其有效的代码为邮件客户端?

EDIT : once coded is there any free service that can help to check if its valid code for mail clients ?

推荐答案

为了确保HTML通讯看起来像我一定会使用内联样式的设计。

To make sure that the HTML newsletter looks as close as the designs I would definitely use inline styling.

不幸的是,您必须非常注重您的样式,否则一些软件(例如Gmail)会覆盖您的样式声明。这是一个真正的痛苦有时,但它是值得这样做的方式IMO。

Unfortunately you have to be very specific with your styling, otherwise some software (Gmail for instance) will override your style declarations. It is a real pain sometimes, but it's worth doing it that way IMO.

同样的事情适用于HTML电子邮件签名。

Same thing goes for HTML email signatures.

所以一定要选择内联样式:)

哦,还有一件事。我知道这是2012年和负载的设计师/前端建议在HTML电子邮件和签名中使用html标签(甚至html5元素),但我会尽力坚持老式的方式,并使用表,以确保有没有不必要的代码。

Oh, and one more thing. I know that it's 2012 and loads of designers/front-enders advice to use html tags (even html5 elements) in HTML emails and signatures, but I'd try to stick to the old-school way and use tables to make sure there is no unnecessary artefacts with the code.

这篇关于混乱关于css编码标准的Html电子邮件通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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