麻烦有一个CSS顺序(弹性框)工作在一个电子邮件 [英] Trouble having CSS order (flex box) work in an email

查看:123
本文介绍了麻烦有一个CSS顺序(弹性框)工作在一个电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在2个网页中有一些HTML正常工作,但是在某个时候,我抓住了容器div的innerhtml并将其发送给用户。

I have got some HTML working fine in 2 web pages, but at one point, I grab the innerhtml of the container div and mail that to the user.

相同的代码,即使在电子邮件代码中,也不会有相同的功能。这是否只适用于浏览器?

The same code, even when it's all in the email code, doesn't function the same way. Is this something that only works in browsers?

以下是一些无法正常工作的示例代码:

Here is some sample code that isn't working as I'd like :

<div class="flex" style="display: flex; flex-direction: column; margin:11px 0; ">
<div style="order: 2">Growth <strong> 2</strong></div>
<div style="order: 5">Safety <strong>5</strong></div>
<div style="order: 3">Income <strong> 3</strong> </div>
<div style="order: 4">Tax Efficiency <strong>4</strong> </div>
<div style="order: 1">Liquidity <strong> 1</strong></div>
</div>

添加:

OK ...我在网路上找到的大部分内容都让我相信,显示我之前分享的代码将不会转移到电子邮件。所以我有一个不同的问题....可能的是,当我将div的innerhtml保存到字段中以插入到电子邮件中,我可以在发送到电子邮件之前将子div放在正确的顺序中?所以电子邮件只是显示它,而不是处理它。

OK... most of what I'm finding around on the web, leads me to believe that displaying the code that I shared earlier will not transfer to email. So I have a different question.... is it possible, that when I save the div's innerhtml to the field for insertion into the email that I can put the sub divs in the correct order BEFORE sending to the email? so the email just has to display it, not process it.

所以好奇我怎么能实际地移动细分在...经常发生,我被要求做在最后一刻,没有时间学习一个全新的系统,但如果有人知道如何做到这一点,也许指向正确的链接,那将是巨大的。

So curious how I can actually move the subdivs around... as often happens, I got asked to do this at the last minute and don't have time to learn an entirely new system, but if someone knows how this can be done and maybe point me to the right link, that would be great.

非常感谢你们的意见迄今为止。

Thanks very much guys for your comments so far.

推荐答案


这是只有在浏览器中有效?

Is this something that only works in browsers?

在某种程度上,是的。

大多数电子邮件客户端只支持非常基本的HTML,当然没有更新的。不要依赖新的HTML / CSS / JavaScript来正常工作;甚至更老的并不总是很好 - 仍然需要使用表格布置页面,并使用内联样式进行视觉效果。

Most email clients only support very basic HTML and certainly nothing newer. Don't rely on new HTML/CSS/JavaScript to work in them properly; even older doesn't always work well - still need to lay out pages with tables and use inline styles for visuals.

这篇关于麻烦有一个CSS顺序(弹性框)工作在一个电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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