想在 html 中使用多个?

Want to use multiple   in html?

我有一种情况,我想 space 使用多个 space 排除 html 中的元素。除了使用多个   之外还有其他方法吗?

HTML:

<td width="10%">
    <a href=""><i class="glyphicon glyphicon-envelope"></i></a>View&nbsp;&nbsp;&nbsp;
    <a href=""><i class="glyphicon glyphicon-link"></i></a>Append&nbsp;&nbsp;&nbsp;
    <a href=""><i class="glyphicon glyphicon-trash"></i></a>Delete
</td>

使用 CSS 将 marginpadding 更改为 space 您的元素通常是公认的答案。

您也可以疯狂使用 position: absolutepostion: relative 和 space 元素,方法是使用 topleft 属性。

我自己想通了: 这可以通过以下方式实现,具体取决于您想要多少 space:

&nbsp;    - single space
&thinsp;  - thin space
&ensp;    - en space(half the point size of the font)
&emsp;    - em space(point size of the font)

参考:http://www.w3.org/MarkUp/html3/specialchars.html

这是我所做的:

<td width="10%">
    <a href=""><i class="glyphicon glyphicon-envelope"></i></a>View&thinsp;
    <a href=""><i class="glyphicon glyphicon-link"></i></a>Append&thinsp;
    <a href=""><i class="glyphicon glyphicon-trash"></i></a>Delete
</td>

希望这对您有所帮助。

没办法space。你应该更多,我之前研究过,我没有找到任何其他方法。只是,如果你想把 space 用于所有行,请使用 br.

你可以把它放在下面:-

<div class="space_lg">&nbsp;</div>

css

.space_lg
{
width:100px;
}

如果您想要始终较大的 space,您可以使用 word-spacing:

p:first-of-type {
    word-spacing: 2em;
}
<p>Some text that you want spaced</p>
<p>Some text with regular spacing</p>

span 标签与 display:inline-block 一起使用,并向其添加 width