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日--


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM