如何显示非HTML换行符 [英] How to display non-HTML line breaks

查看:70
本文介绍了如何显示非HTML换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

G''day每个人


我试图找出是否有办法(也许使用CSS)让这个代码来这个代码




< table>< tr>< td>一个

两个

三< / td>< / tr>< / table>


显示的代码与代码相同:


< table>< tr> ;< td>一个< br>

两个< br>

三< / td>< / tr>< / table>


当然,一旦我弄清楚如何做到这一点,我仍然要看看我的

所见即所得HTML查看器是否可以显示它:-)因为我的所见即所得HTML查看器

是MS Word和/或OOo Writer。原因是我正在尝试使用

HTML作为中间格式将CSV转换为文字处理

格式。但是让我担心......如果你能帮我解决上述问题,那将会很棒。


提前致谢

Samuel(又名leuce)ltns

G''day everyone

I''m trying to find out if there is a way (perhaps using CSS) to let
this code:

<table><tr><td>One
Two
Three</td></tr></table>

display the same as if the code would have been:

<table><tr><td>One<br>
Two<br>
Three</td></tr></table>

Of course, once I figure out how to do this, I still have to see if my
wysiwig HTML viewer can display it :-) because my wysiwig HTML viewer
is MS Word and/or OOo Writer. The reason is that I''m trying to use
HTML as an intermediary format to convert CSV to a word processing
format. But let me worry about that... it would be great if any of
you could just help me with the problem described above.

Thanks in advance
Samuel (aka leuce) ltns

推荐答案

2008-09-03,Samuel Murray< le *** @ absamail.co.zawrote:
On 2008-09-03, Samuel Murray <le***@absamail.co.zawrote:

G''day每个人


我想知道是否有是一种方式(也许使用CSS)让

这段代码:

< table>< tr>< td>一个

两个

三< / td>< / tr>< / table>


显示的代码与代码一样:

< table>< tr>< td>一个< br>

两个< br>

三< / td>< / tr> ;< /表>
G''day everyone

I''m trying to find out if there is a way (perhaps using CSS) to let
this code:

<table><tr><td>One
Two
Three</td></tr></table>

display the same as if the code would have been:

<table><tr><td>One<br>
Two<br>
Three</td></tr></table>



td {white-space:pre-wrap}


或只是white-space:pre(并非所有浏览器都支持所有更具异国情调的

风味的白色空间)。

td { white-space: pre-wrap }

or just white-space: pre (not all browsers support all the more exotic
flavours of white-space).


Samuel Murray写道:
Samuel Murray wrote:

我试图找出是否有办法(也许使用CSS)让这个代码来




< table> ;< tr>< td>一个

两个

三< / td>< / tr>< / table>


显示的代码与代码相同:


< table>< tr>< td>一个< br>

两个< br>

三< / td>< / tr>< / table>


当然,一旦我弄明白怎么办这个,我还是要看看我的

符文浏览HTML查看器是否可以显示它:-)因为我的所见即所得HTML查看器

是MS Word和/或OOo Writer。原因是我正在尝试使用

HTML作为中间格式将CSV转换为文字处理

格式。但是让我担心...如果你能帮我解决上述问题,那将会很棒。
I''m trying to find out if there is a way (perhaps using CSS) to let
this code:

<table><tr><td>One
Two
Three</td></tr></table>

display the same as if the code would have been:

<table><tr><td>One<br>
Two<br>
Three</td></tr></table>

Of course, once I figure out how to do this, I still have to see if my
wysiwig HTML viewer can display it :-) because my wysiwig HTML viewer
is MS Word and/or OOo Writer. The reason is that I''m trying to use
HTML as an intermediary format to convert CSV to a word processing
format. But let me worry about that... it would be great if any of
you could just help me with the problem described above.



< table>< tr>< td>< pre>一个

两个

三个

1

2

3< / pre>< / td>< / tr>< / table>


-

Nico

<table><tr><td><pre>One
Two
Three
1
2
3</pre></td></tr></table>

--
Nico


9月3日,9:06 * am,Ben C< spams ... @ spam.eggswrote:
On Sep 3, 9:06*am, Ben C <spams...@spam.eggswrote:

2008-09-03,Samuel Murray< le ... @ absamail.co.zawrote:
On 2008-09-03, Samuel Murray <le...@absamail.co.zawrote:


我试图找出是否有办法(也许使用CSS)让

此代码:
I''m trying to find out if there is a way (perhaps using CSS) to let
this code:


td {white-space:pre-wrap}

或只是白色空间:pre(并非所有浏览器都支持所有更具异国情调的b
风格的白色空间)。
td { white-space: pre-wrap }

or just white-space: pre (not all browsers support all the more exotic
flavours of white-space).



谢谢,这确实有帮助。


很明显,MS Word XP了解pre但不预先包装。 OOo Writer

2.4不理解其中任何一个。


Samuel(leuce)

Thanks, this really helps.

Incidently, MS Word XP understands pre but not pre-wrap. OOo Writer
2.4 does not understand either of them.

Samuel (leuce)


这篇关于如何显示非HTML换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆