如何将.less文件的CSS应用于电子邮件正文? [英] How to apply CSS of images from .less file to email body ?

查看:116
本文介绍了如何将.less文件的CSS应用于电子邮件正文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个html页面,其中包含不同的股票列表和相应的旗帜图像。我想通过邮件将这个html主体发送给客户端。我在google上搜索了很多但没有找到任何解决方案。

I have one html page which contains different stocks list and corresponding flag images. I want to sent this html body through mail to client. I have search many on google but not found any solution.

推荐答案

为图像添加内联样式而不是 CSS 文件。

电子邮件客户只识别内联样式



浏览文章......

1. 如何编码HTML电子邮件 [ ^ ]

2. 处理电子邮件中的CSS样式 [ ^ ]

Give inline styles to images instead of CSS file.
Email clients recognize inline styles only.

Go through the articles...
1. How To Code HTML Emails[^]
2. Dealing with CSS Styles in Email[^]
Quote:

为什么使用内联CSS?



由于电子邮件客户端禁用外部样式表或条带嵌入式,内联CSS已成为向HTML电子邮件添加样式的最流行的方法。与外部或嵌入式样式表中的CSS不同,内联CSS必须应用于您希望设置样式的每个HTML元素。

Why Use Inline CSS?


Since email clients disable external style sheets or strip embedded ones, inline CSS has become the most popular method for adding style to HTML emails. Unlike CSS from an external or embedded style sheet, inline CSS must be applied to each HTML element you wish to style.

那么,如果您的设计团队精心设计了您喜欢的酷电子邮件设计,那么电子邮件营销人员应该做些什么 - 但是使用嵌入式样式表代替内联CSS样式?

So what’s an email marketer to do, if your design team has crafted a cool email design that you like – but used an embedded style sheet instead of inline CSS styles?

简单。 请查看此工具以 将嵌入式HTML电子邮件CSS样式转换为内联CSS

Simple.  Check out this tool to convert embedded HTML Email CSS styles to inline CSS.

此CSS Inliner工具可将电子邮件广告系列中的CSS样式转换为大多数电子邮件客户端将显示的内联样式属性。 只需将原始HTML代码粘贴到嵌入式CSS样式部分,这个方便的工具将立即生成一个内联版本,您可以将其粘贴回Pinpointe编辑器。

This CSS Inliner tool converts CSS styles in your email campaign into inline style attributes that most email clients will display.  Just paste your original HTML code with an embedded CSS Style section and this handy tool will instantly produce an inlined version that you can paste back into your Pinpointe editor.



因此,您可以使用该工具将HTML转换为仅包含内联css。


So, you can use the tool to convert HTML to include inline css only.


这篇关于如何将.less文件的CSS应用于电子邮件正文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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