在电子邮件中为html设置样式 [英] Styling html in email

查看:661
本文介绍了在电子邮件中为html设置样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为有能力的客户发送电子邮件的HTML版本(现在不是几乎所有?)。我的担心是如何风格。我使用内联css吗?我可以在html中包括样式表吗? html以< html> < body> 开头吗?是否有标准我可以阅读这个?

I'm sending emails with an HTML version for capable clients (isn't that virtually all nowadays?). My worry is how to style it. Do I use inline css? Can I include the stylesheet in the html? Does the html begin with <html> or <body>? Is there a standard I can read on this?

我可以在样式中走多远?我有border-radius,背景渐变等,有自然回退机制的浏览器不支持它(IE)。对于IE,我使用PIE.htc,我假设这太远了...

How far can I go in styling? I have border-radius, background gradients, etc that have natural fallback mechanisms for browsers that don't support it (IE). For IE, I use PIE.htc, I assume that's going too far...

推荐答案

涉及电子邮件中的HTML以< body> 开头。所有的样式都必须内联,不幸的是,电子邮件客户端的行为不像浏览器那样。有一些很好的信息这里:

As far as the email client is concerned the HTML in an email begins with <body>. All styling must be done inline, unfortunately email clients don't behave the same way browsers do. There is some good information available here:

这篇关于在电子邮件中为html设置样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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