想要使用多个   在 html 中?

Vip*_*wal 5 html format whitespace

我有一种情况,我想使用多个空格将 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>
Run Code Online (Sandbox Code Playgroud)

Vip*_*wal 8

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

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

参考: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>
Run Code Online (Sandbox Code Playgroud)

希望这会有所帮助。