句子间距 [英] Sentence Spacing
问题描述
使用[X] HTML + CSS,在句子之间显示额外间距的最佳方法是什么?
What is the best way to present the additional spacing that should come between sentences (using [X]HTML+CSS)?
<p>Lorem ipsum. Dolor sit amet.</p>
^^ wider than word spacing
由于HTML和XML都需要空格折叠,两个空格必须表现为一个空格。
Since HTML and XML both require whitespace folding, the above two spaces must behave as a single space.
有什么选项? 下面有几个明显的,其他人存在? (CSS3中的任何东西?) 如果有的话,存在什么缺点,包括在不同的浏览器? (下面的不间断空格如何与换行符交互?)
What options are there? There are a few obvious ones below, what others exist? (Anything in CSS3?) What drawbacks, if any, exist for the these, including across different browsers? (How do the non-breaking spaces below interact with line wrapping?)
-
.. ipsum。 & nbsp; Dolor ..
-
.. ipsum。& nbsp; Dolor ..
-
.. ipsum。& nbsp;& nbsp; Dolor ..
/ li>
..ipsum. Dolor..
..ipsum. Dolor..
..ipsum. Dolor..
网络上有很多FUD,声称这是为打字机发明的,您可以在诸如美国独立宣言等文件中看到它。 (是的,我意识到你不应该遵守所有的约定,从二百多年前,DoI只是一个方便的例子显示这个前面的打字机和单调的字体。) 或者更改背景后,表示其他空间分散注意力的排版者颜色,所以示例不能是任何其他!
There's a lot of FUD on the net which claims this was invented for typewriters, but you can see it in documents such as the U.S. Declaration of Independence. (And yes, I realize you shouldn't follow all the conventions from over two hundred years ago, the DoI is merely a handy example showing this predates typewriters and monospaced fonts.) Or a typographer claiming that the additional space is distracting—after changing the background color so the example cannot be anything else!
简单地说,虽然我欣赏意见和讨论是否应使用额外的间距(这不是编程相关),这不是我要求的。假设这是一个要求,实现它的最好方法是什么?
To put it bluntly, while I appreciate opinions and discussion on whether additional spacing should be used or not (which isn't programming related), that is not what I'm asking. Assume this a requirement, what is the best way to implement it?
推荐答案
也许。 (不是一个很好的解决方案)。
Wrap each sentence in a span, and style the span perhaps. (Not a great solution).
这篇关于句子间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!