0

当我从 word doc 复制/粘贴到 Expressions Web 时,我得到了奇怪的行为。我的截图来自下面的文字,有时它会将顶行放在一个<span>标签中,其余的放在一个单独的<span>标签中,导致两者之间存在细微差距。这是否正在成为如何使用 HTML 进行编码的新规范,还是我的 word 文档中隐藏了我看不到的字符/中断。例如,直接复制/粘贴呈现此 HTML

<p class="MsoNormal"><b><u>This is the top row of my information<o:p>
</o:p></u></b></p>
<span style="font-size:12.0pt;font-family:&quot;
Times New Roman&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;
mso-bidi-language:AR-SA">This is information that should come 
up under the top 
row and I am just trying to span it for more than 1 line, 
maybe go to 2 or three 
or four or five or six.<span style="mso-spacerun: yes">&nbsp; </span>
Oh here comes 
more and more and more and more and more and more and more and more.
<span style="mso-spacerun: yes">&nbsp;
</span>Oh I am not done yet, not yet not yet.
<span style="mso-spacerun: yes">&nbsp;
</span>Okay I think this is enough once I reach one more last line.
<span style="mso-spacerun: yes">&nbsp;
</span>Almost to the end, yes I hit it!</span>

对我来说,只需使用以下语法即可实现完全相同的效果:

<p><strong><u>This is the top row of my information</u></strong><br>
This is information that should come up under the top row and I am just
trying to span it for more than 1 line, maybe go to 2 or three or four or
five or six.  Oh here comes more and more and more 
and more and more and more and more and more.  Oh I am not done yet, 
not yet not yet.  Okay I think this is enough once I reach one more last   
line. Almost to the end, yes I hit it!</p>

为什么所有额外的语法都带有表达式?

文字截图 表达式设计视图 表达式 HTML 视图

4

1 回答 1

2

我可能是错的,但我相信通常从 Microsoft Word 复制和粘贴会导致 Expression Web 出现问题。我会详细说明原因,但是在我上大学的时候,有人特别告诉我,如果要这样做,我们应该从记事本之类的程序中复制和粘贴。

根据微软的说法,似乎不建议直接复制/粘贴。如果您还没有,请尝试使用格式粘贴。浏览此处获取更多信息。

这里还有另一个指向Microsoft 论坛的链接,该链接指出 Word 具有可怕的 Web 标记,因为它不是 Web 设计工具。

于 2015-12-11T13:40:55.930 回答