在手机中设置内容堆叠顺序(HTML电子邮件)
我目前正在制作一封电子邮件,但我真的很难设置某些内容在手机上显示时的堆叠顺序 例如,我的一个内容块在左侧有一块文本,然后在右侧有一个图像。在另一个内容块中,我在左侧有一个图像,在右侧有一个文本块。但是,在这两个内容块中,文本块和图像在移动设备中将变为全宽,将它们放在单个行上。我想要的是先显示文本,然后再显示图像,这两个部分我都想要 有没有人能够建议任何CSS能够做到这一点?人们建议使用Z-Index,但我知道这对我不起作用。除非我用错了在手机中设置内容堆叠顺序(HTML电子邮件),html,css,html-email,Html,Css,Html Email,我目前正在制作一封电子邮件,但我真的很难设置某些内容在手机上显示时的堆叠顺序 例如,我的一个内容块在左侧有一块文本,然后在右侧有一个图像。在另一个内容块中,我在左侧有一个图像,在右侧有一个文本块。但是,在这两个内容块中,文本块和图像在移动设备中将变为全宽,将它们放在单个行上。我想要的是先显示文本,然后再显示图像,这两个部分我都想要 有没有人能够建议任何CSS能够做到这一点?人们建议使用Z-Index,但我知道这对我不起作用。除非我用错了 不幸的是,我无法共享任何屏幕截图或代码,因为它不是我的电子
不幸的是,我无法共享任何屏幕截图或代码,因为它不是我的电子邮件,属于客户。您可以尝试通过组合固定宽度表格和
对齐来反向堆叠表格。align
属性将它们放置在桌面上(文本左侧和图像右侧),然后设置width:100%!重要信息
对于移动视图,将强制它们按照html的顺序堆叠(移动图像)
您可以通过组合固定宽度表格和align
来尝试反向表格堆叠。align
属性将它们放置在桌面上(文本左侧和图像右侧),然后设置width:100%!重要信息
对于移动视图,将强制它们按照html的顺序堆叠(移动图像)
您可以使用要反转其堆叠顺序的表中的dir=“rtl”属性反转内容的默认堆叠顺序。这项技术在其他地方都有记录。还有一个广泛使用的模板演示了这种技术。下面包含了一个使用此技术的表的代码片段-有关包含CSS的完整示例,请参见上面指向Cerberus模板的链接。注意:HTML电子邮件设备支持始终处于不断变化之中,因此建议在发送之前在电子邮件测试服务中测试此解决方案,如在Acid或Litmus上发送电子邮件
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="600" style="margin: auto;" class="email-container">
<!-- Thumbnail Right, Text Left : BEGIN -->
<tr>
<td dir="rtl" width="100%" style="padding: 10px; background-color: #ffffff;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- Column : BEGIN -->
<th width="33.33%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="padding: 0 10px;">
<img src="https://via.placeholder.com/170" width="170" height="170" alt="alt_text" border="0" class="center-on-narrow" style="height: auto; background: #dddddd; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;">
</td>
</tr>
</table>
</th>
<!-- Column : END -->
<!-- Column : BEGIN -->
<th width="66.66%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555; padding: 10px; text-align: left;" class="center-on-narrow">
<h2 style="margin: 0 0 10px 0; font-family: sans-serif; font-size: 18px; line-height: 22px; color: #333333; font-weight: bold;">Class aptent taciti sociosqu</h2>
<p style="margin: 0 0 10px 0;">Maecenas sed ante pellentesque, posuere leo id, eleifend dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<!-- Button : BEGIN -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" class="center-on-narrow" style="float:left;">
<tr>
<td class="button-td button-td-primary" style="border-radius: 4px; background: #222222;">
<a class="button-a button-a-primary" href="https://google.com/" style="background: #222222; border: 1px solid #000000; font-family: sans-serif; font-size: 15px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Primary Button</a>
</td>
</tr>
</table>
<!-- Button : END -->
</td>
</tr>
</table>
</th>
<!-- Column : END -->
</tr>
</table>
</td>
</tr>
<!-- Thumbnail Right, Text Left : END -->
</table>
类aptent taciti socialsqu
梅塞纳斯·塞德·佩伦茨克、波苏尔·利奥·艾德、埃利芬德·多洛。根据康努比亚·诺斯特拉(conubia nostra)和希梅纳奥斯(inceptos himenaeos)的规定,社会责任和责任等级为:
您可以使用要反转其堆叠顺序的表中的dir=“rtl”属性反转内容的默认堆叠顺序。这项技术在其他地方都有记录。还有一个广泛使用的模板演示了这种技术。下面包含了一个使用此技术的表的代码片段-有关包含CSS的完整示例,请参见上面指向Cerberus模板的链接。注意:HTML电子邮件设备支持始终处于不断变化之中,因此建议在发送之前在电子邮件测试服务中测试此解决方案,如在Acid或Litmus上发送电子邮件
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="600" style="margin: auto;" class="email-container">
<!-- Thumbnail Right, Text Left : BEGIN -->
<tr>
<td dir="rtl" width="100%" style="padding: 10px; background-color: #ffffff;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- Column : BEGIN -->
<th width="33.33%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="padding: 0 10px;">
<img src="https://via.placeholder.com/170" width="170" height="170" alt="alt_text" border="0" class="center-on-narrow" style="height: auto; background: #dddddd; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;">
</td>
</tr>
</table>
</th>
<!-- Column : END -->
<!-- Column : BEGIN -->
<th width="66.66%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555; padding: 10px; text-align: left;" class="center-on-narrow">
<h2 style="margin: 0 0 10px 0; font-family: sans-serif; font-size: 18px; line-height: 22px; color: #333333; font-weight: bold;">Class aptent taciti sociosqu</h2>
<p style="margin: 0 0 10px 0;">Maecenas sed ante pellentesque, posuere leo id, eleifend dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<!-- Button : BEGIN -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" class="center-on-narrow" style="float:left;">
<tr>
<td class="button-td button-td-primary" style="border-radius: 4px; background: #222222;">
<a class="button-a button-a-primary" href="https://google.com/" style="background: #222222; border: 1px solid #000000; font-family: sans-serif; font-size: 15px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Primary Button</a>
</td>
</tr>
</table>
<!-- Button : END -->
</td>
</tr>
</table>
</th>
<!-- Column : END -->
</tr>
</table>
</td>
</tr>
<!-- Thumbnail Right, Text Left : END -->
</table>
类aptent taciti socialsqu
梅塞纳斯·塞德·佩伦茨克、波苏尔·利奥·艾德、埃利芬德·多洛。根据康努比亚·诺斯特拉(conubia nostra)和希梅纳奥斯(inceptos himenaeos)的规定,社会责任和责任等级为:
“很遗憾,我无法共享任何截图或代码,因为它不是我的电子邮件,属于客户。”-那么,我们很难(如果不是不可能的话)帮助您,对不起。当然
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="600" style="margin: auto;" class="email-container">
<!-- Thumbnail Right, Text Left : BEGIN -->
<tr>
<td dir="rtl" width="100%" style="padding: 10px; background-color: #ffffff;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- Column : BEGIN -->
<th width="33.33%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="padding: 0 10px;">
<img src="https://via.placeholder.com/170" width="170" height="170" alt="alt_text" border="0" class="center-on-narrow" style="height: auto; background: #dddddd; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;">
</td>
</tr>
</table>
</th>
<!-- Column : END -->
<!-- Column : BEGIN -->
<th width="66.66%" class="stack-column-center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td dir="ltr" valign="top" style="font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555; padding: 10px; text-align: left;" class="center-on-narrow">
<h2 style="margin: 0 0 10px 0; font-family: sans-serif; font-size: 18px; line-height: 22px; color: #333333; font-weight: bold;">Class aptent taciti sociosqu</h2>
<p style="margin: 0 0 10px 0;">Maecenas sed ante pellentesque, posuere leo id, eleifend dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<!-- Button : BEGIN -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" class="center-on-narrow" style="float:left;">
<tr>
<td class="button-td button-td-primary" style="border-radius: 4px; background: #222222;">
<a class="button-a button-a-primary" href="https://google.com/" style="background: #222222; border: 1px solid #000000; font-family: sans-serif; font-size: 15px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Primary Button</a>
</td>
</tr>
</table>
<!-- Button : END -->
</td>
</tr>
</table>
</th>
<!-- Column : END -->
</tr>
</table>
</td>
</tr>
<!-- Thumbnail Right, Text Left : END -->
</table>