Open yaofly2012 opened 3 years ago
table
的元素们table
display: table
特殊性display: table
元素首先是个块元素,但是尺寸(宽高)是由内容决定(默认情况下)的。这一点跟display: block
元素不同。
display: table
元素像是个width: fit-content
的display: block
元素。但是display: table
元素也可以显示的指定宽度和高度。
综上display: table
元素和display: block
元素区别在于:
display: table
元素默认宽度由内容决定,display: block
元素默认宽度则占据整行。其他情况两者倒是没啥区别。
cellpadding
cellspacing
border
align
width
但这些都是被废弃的属性(都可以用CSS实现),在实际编程中我们更多的是重置这些属性。
td
display: table-cell
特殊性元素以表格单元格td
的形式呈现,具体表现同td
,如:
margin
height
width
align
valign
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=unicode">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 15">
<meta name=Originator content="Microsoft Word 15">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536869121 1107305727 33554432 0 415 0;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:DengXian;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:-1610612033 953122042 22 0 262159 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-469750017 -1073732485 9 0 511 0;}
@font-face
{font-family:"Helvetica Neue";
mso-font-alt:Arial;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:-1610612033 953122042 22 0 262159 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:宋体;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
text-decoration:underline;
text-underline:single;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-unhide:no;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:宋体;}
span.EmailStyle18
{mso-style-type:personal;
mso-style-noshow:yes;
mso-style-unhide:no;
font-family:等线;
mso-ascii-font-family:等线;
mso-fareast-font-family:等线;
mso-hansi-font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
mso-ascii-font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";
mso-font-kerning:0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}
</style>
<![endif]--><!--[if gte mso 9]>
<xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml>
<![endif]--><!--[if gte mso 9]>
<xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout>
</xml>
<![endif]-->
</head>
<body bgcolor="#FAFAFA" lang=ZH-CN link=blue vlink=purple style='tab-interval:
21.0pt'>
<div class=WordSection1>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
style='width:100.0%;mso-cellspacing:0cm;background:#FAFAFA;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 0cm 0cm 0cm;min-width: 640px' id=body>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:3.0pt'>
<td style='background:#6B4FBB;padding:0cm 0cm 0cm 0cm;height:3.0pt'></td>
</tr>
<tr style='mso-yfti-irow:1'>
<td style='padding:18.75pt 0cm 18.75pt 0cm'></td>
</tr>
<tr style='mso-yfti-irow:2'>
<td style='padding:0cm 0cm 0cm 0cm;border-radius: 3px;overflow:hidden'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=640
style='width:480.0pt;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm;border-spacing: 0'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td style='border:solid #EDEDED 1.0pt;padding:13.5pt 18.75pt 13.5pt 18.75pt;
border-spacing: 0'>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
width="100%" style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 0cm 0cm 0cm;border-radius: 3px;overflow:hidden'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td style='background:#31AF64;padding:7.5pt 7.5pt 7.5pt 7.5pt;border-spacing: 0'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td style='padding:.75pt 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-family:"Helvetica Neue";color:white'>
Your has passed.
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:1;height:13.5pt'>
<td style='padding:0cm 0cm 0cm 0cm;height:13.5pt'>
<p class=MsoNormal align=center style='text-align:center;line-height:
13.5pt'>
<span lang=EN-US style='font-size:13.5pt;font-family:"Helvetica Neue"'>
<o:p></o:p>
</span>
</p>
</td>
</tr>
<tr style='mso-yfti-irow:2'>
<td style='border:solid #EDEDED 1.0pt;padding:0cm 11.25pt 0cm 11.25pt;
border-radius: 3px;overflow:hidden'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
width="100%" style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:
1184;mso-padding-alt:0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td style='padding:10.5pt 0cm 10.5pt 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#8C8C8C'>
Project
<o:p></o:p>
</span>
</p>
</td>
<td width="75%" style='width:75.0%;padding:10.5pt 0cm 10.5pt 3.75pt'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#333333'>
<a href="#"><span
style='color:#333333;text-decoration:none;text-underline:none'>xxxx
</span></a>/ <a
href="#"><span
style='color:#333333;text-decoration:none;text-underline:none'>xxxx
</span></a>
<o:p></o:p>
</span>
</p>
</td>
</tr>
<tr style='mso-yfti-irow:1'>
<td style='border:none;border-top:solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#8C8C8C'>
Branch
<o:p></o:p>
</span>
</p>
</td>
<td width="75%" style='width:75.0%;border:none;border-top:solid #EDEDED 1.0pt;
padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:0cm 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
<a
href="#"><span
style='color:#333333;text-decoration:none;text-underline:none'>xxxx
</span></a>
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:2'>
<td style='border:none;border-top:solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#8C8C8C'>
Commit
<o:p></o:p>
</span>
</p>
</td>
<td width="75%" style='width:75.0%;border:none;border-top:solid #EDEDED 1.0pt;
padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:0cm 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
<a
href="#"><span
style='color:#3777B0;text-decoration:none;text-underline:none'>xxxx
</span></a>
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
<div>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#5C5C5C'>
add tagid
<o:p></o:p>
</span>
</p>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:3'>
<td style='border:none;border-top:solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#8C8C8C'>
Commit Author
<o:p></o:p>
</span>
</p>
</td>
<td width="75%" style='width:75.0%;border:none;border-top:solid #EDEDED 1.0pt;
padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:0cm 3.75pt 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
border:solid windowtext 1.0pt;padding:0cm'><img border=0 width=24
height=24 id="_x0000_i1025" src="xxx.jpg" style='height:
.25in;width:.25in' alt=""></span>
<span lang=EN-US
style='font-size:11.5pt;font-family:"Helvetica Neue"'>
<o:p></o:p>
</span>
</p>
</td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
<a
href="#"><span style='color:
#333333;text-decoration:none;text-underline:none'>XXX</span><span
lang=EN-US style='font-family:宋体;color:#333333;text-decoration:none;
text-underline:none'><span lang=EN-US>XXX</span></span><span
lang=EN-US style='color:#333333;text-decoration:none;text-underline:
none'><span lang=EN-US> </span></span></a>
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:4'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
The
coverage is 0.00%;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:5'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Conditionals:
The coverage is 0.00%;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:6'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Elements:
The coverage is 0.00%;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:7'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Methods:
The coverage is 0.00%;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:8'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Statements:
The coverage is 0.00%;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:9'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
Has
2395 code issues
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:10'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Warning:
Has 1513 issues;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:11'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt;font-size:14x'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 7.5pt'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:10.0pt;font-family:"Helvetica Neue"'>
Error:
Has 882 issues;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:12;mso-yfti-lastrow:yes'>
<td width="75%" colspan=2 style='width:75.0%;border:none;border-top:
solid #EDEDED 1.0pt;padding:10.5pt 0cm 10.5pt 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:
yes'>
<td style='padding:1.5pt 3.75pt 0cm 0cm'></td>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
Has
1513 chinese issues;
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:3;height:13.5pt'>
<td style='padding:0cm 0cm 0cm 0cm;height:13.5pt'>
<p class=MsoNormal align=center style='text-align:center;line-height:
13.5pt'>
<span lang=EN-US style='font-size:13.5pt;font-family:"Helvetica Neue"'>
<o:p></o:p>
</span>
</p>
</td>
</tr>
<tr style='mso-yfti-irow:4'>
<td style='padding:11.25pt 3.75pt 0cm 3.75pt'>
<div align=center>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:
0cm 0cm 0cm 0cm'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td valign=top style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
XXX
<a
href="#"><span
style='color:#3777B0;text-decoration:none;text-underline:none'>XXX
</span></a>triggered by
<o:p></o:p>
</span>
</p>
</td>
<td width=24 style='width:18.0pt;padding:0cm 3.75pt 0cm 3.75pt'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
border:solid windowtext 1.0pt;padding:0cm'><img border=0 width=24
height=24 id="_x0000_i1026" src="xxx.jpg" style='height:.25in;
width:.25in' alt=""></span>
<span lang=EN-US style='font-size:
11.5pt;font-family:"Helvetica Neue"'>
<o:p></o:p>
</span>
</p>
</td>
<td valign=top style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue"'>
<a
href="#"><span style='color:#333333;
text-decoration:none;text-underline:none'>xxxx</span><span lang=EN-US
style='font-family:宋体;color:#333333;text-decoration:none;text-underline:
none'><span lang=EN-US>XXX</span></span><span lang=EN-US
style='color:#333333;text-decoration:none;text-underline:none'><span
lang=EN-US> </span></span></a>
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
<td style='padding:11.25pt 3.75pt 11.25pt 3.75pt'>
<p class=MsoNormal align=center style='text-align:center'>
<span
lang=EN-US style='font-size:11.5pt;font-family:"Helvetica Neue";
color:#333333'>
successfully
<o:p></o:p>
</span>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
<td style='padding:18.75pt 0cm 18.75pt 0cm'></td>
</tr>
</table>
</div>
<p class=MsoNormal>
<span lang=EN-US>
<o:p> </o:p>
</span>
</p>
</div>
</body>
</html>
背景
产品大大让美化下发给用户的邮件内容。还有之前写过EMD,自认为不难,但是实际做的时候发现却没那么容易。因为之前写的EDM页面都是基于公司公共页面结构,自己只是填充一些内容。不过好在会用Google,网上确实不少资源。
EDM(Email Direct Marketing)电子邮箱营销
都2022年谁还用EDM呀。国内用户手机不离手,但是海外用户难以使用短信、app通知触达。EDM是触达海外用户的重要方式。
考虑的问题
限制 & 注意事项
其他博客里列举了很多,这里汇总比较重要的。
1.
table
布局采用table元素布局。即:
table->tr->td
作为容器;table
,tr
的属性实现对齐方式。刚开始不太习惯,并且
table
本身也带有很多默认的属性,导致实现起来比较困难。2. 内联样式
尽量采用内联样式。 如果要使用
style
标签声明样式,则最好加上!import
。记得把style
标签放在body
里,不要放在head
标签里,因为有些邮箱会忽略head
标签内容。3. 图片的使用
图片估计是唯一可以使用的外部资源了,但是需要注意的是
实战
重置
table
默认样式通常会重置
table
的border
,cellspacing
,cellpadding
属性,并且指定width
。如果
table
占据整行,最好也加上min-width: 100%
样式,因为目前在IOS gmail遇到table
宽度完全由内容决定,即指定width="100%"
无效,效果如图(期望结果:表格和按钮占据整行):综上最终
table
样式如:移动端适配
利用媒体查询
@media
但是有些邮箱并不支持媒体查询(目前测试发现有华为P20 内置邮箱)
容器居中
方式1:
table
元素的align
特性方式2:
div
元素的align
特性元素对齐
td
(有时也可用tr
)元素的align
,valign
特性。垂直(水平)间距
方式1:
td
指定padding
table
(tbody
,tr
)无法指定padding
的,因为表格的内容展示在td
里,所以只能给td
指定padding
。方式2: 利用空
td
的高度(宽度)实现垂直(水平)间距。 注意windows版outlook会忽略空td
的高度,不过可以这样写避免这个问题:为了避免空格
高度超过单元格高度可以指定font-size:0;
。border
实现td
制定CSSborder
属性table
本身有border属性,但基本都赋值为0,如果真要实现border
效果,可采用CSSborder
属性。 记得在td
上采用border
属性控制。border-radius
实现可以给
table
或者td
指定border-radius
样式,但如果采用table
实现,则要border-collapse: separate;
很遗憾windows版outlook不支持经验总结
display: inline-block
& 圆角按钮Outlook并不支持该属性。
内容结构不能强依赖图片
有些邮箱默认不加载图片,一定要保证图片不加载是内容结构也能正常阅读。
一定先多看看效果
网上很多针对HTML email的校验工具和发送邮件服务,但基本都收费。屌丝就发给自己看开,土豪的话可以借助工具。
多看看别人怎么写的
奇葩的Outlook
Outlook与Word等共享HTML渲染引擎。几乎仅支持HTML2,其能力堪比IE5! mac版Outlook表现到是很好。
参考