Html中让输入框input和紧接在后的按钮button在垂直方向上对齐

<table border="0px" width="360px">
    <tr><td colspan="10">
       <input id="keywordTxt" type="text"  th:value="${keyword}"/>
       <button id="searchbtn" class="btn" type="button" style="vertical-align: top;"><i class="icon-search"></i> Go</button>
    </td></tr>
...
</table>

上面红字部分 style="vertical-align: top;" 就是关键。

--2020年5月4日--

posted @ 2020-05-04 13:35  逆火狂飙  阅读(1211)  评论(0)    收藏  举报
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东