将空间视为html中的新行

时间:2019-05-29 13:10:15

标签: html css

我们有两个html文件,从外观上看都相似,但是当我们实际渲染时,在其中一个文件中我们有附加的换行符。我可以知道如何避免它吗。

<p class="MsoNoSpacing"><span style="font-size: 12px; font-family: Calibri;font-family:Calibri;font-family:Calibri;"><feff><feff></span><span style="font-size: 12px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Calibri;"><feff></span><span style="font-size: 12px; font-family: Calibri; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 9pt; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="font-family: Calibri; font-size: 12px;"><feff></span><span style="font-family: Calibri; font-size: 12px;">Hi Mr. Calipjo,</span></span><span style="font-family:"Cambria",serif;
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;"> </span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">Greetings!</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">We apologize for the inconvenient
that this may have cause you.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">As of now we are still
coordinating this request to our support team, we are waiting for the feedback
from our support team.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">We will update you once we received
a feedback.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p><span style="font-family: Calibri; font-size: 12px;">









<p class="MsoNoSpacing"><span style="font-size: 12px; font-family: Calibri;font-family:Calibri;font-family:Calibri;"><feff><feff></span><span style="font-size: 12px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Calibri;"><feff></span><span style="font-size: 12px; font-family: Calibri; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 12px; font-family: Calibri; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><feff></span><span style="font-size: 9pt; color: rgb(27, 30, 36); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="font-family: Calibri; font-size: 12px;"><feff></span><span style="font-family: Calibri; font-size: 12px;">Hi Mr. Calipjo,</span></span><span style="font-family:"Cambria",serif;
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;"> </span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">Greetings!</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">We apologize for the inconvenient
that this may have cause you.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">As of now we are still
coordinating this request to our support team, we are waiting for the feedback
from our support team.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family:"Cambria",serif;mso-ascii-theme-font:
major-latin;mso-hansi-theme-font:major-latin"><span style="font-family: Calibri; font-size: 12px;">We will update you once we received
a feedback.</span><o:p></o:p></span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;"> </span></p><p><span style="font-family: Calibri; font-size: 12px;">

1 个答案:

答案 0 :(得分:0)

在第一组HTML中,我可以看到带有

的空白 p 标签
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: 12px;">&nbsp;</span></p>

在第二组HTML中,未呈现

从第一个HTML中删除 会得到相同的输出。

希望这有助于进一步调试。