html 垂直并列显示

笔者在制作登陆网页的时候,发现让input居中十分困难,笔者在网上搜了好久都没有结果,所以就想出了一个硬核的纯html的解决方法

直接上代码:

<div style="text-align: center;">
        <input id="um" type="text" placeholder="username" /><br />
        <input id="pd" type="text" placeholder="passwords" /><br />
        <button id="bu">提交</button>
    </div>

其中<br/>是换行符
效果如图:
效果图

posted @ 2020-01-31 18:20  Eritque-arcus  阅读(74)  评论(0)    收藏  举报