在xaml中,我可以通过在标记上使用xml:space属性来使空白相关(不会被忽略).参考:http: //msdn.microsoft.com/en-us/library/ms788720.aspx
有没有办法让html中的空白相关?
更新:
最后去了:
<p style="white-space: pre">
Hi This
is
an example
</p>
虽然Aziz shaikh解决方案也可以正常工作.
不知道我是否正确理解你的问题,但如果你想在html中保留White Spaces,pre是你要找的标签
<html>
....
<pre>
hi this
is
an example
</pre>
</html>
Run Code Online (Sandbox Code Playgroud)
它会为您提供:
Hi This
is
an example
| 归档时间: |
|
| 查看次数: |
546 次 |
| 最近记录: |