如何删除HTML中的span标记之间的断行

bob*_*nes 0 html css

似乎我的<span>标签在我的内部导致新的换行符<td>.你通常怎么解决这个问题?

<tr>
<td> date</td> <!--date--> 
<td> <span class="icon1"> <img here> </span> | <span class="icon2"> <img here> </span> </td> <!--action-->
</tr>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

[update = added css]

.icon1{
    width:22px;
    height:22px;
    background-color:#eb2960;
    display:block;
    border-radius:4px;
    cursor: pointer; cursor: hand;
}
Run Code Online (Sandbox Code Playgroud)

Ale*_*lex 7

使用display: inline-block.icon.

display: block 导致元素前后的换行符.