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/>是换行符
效果如图:
效果图

原创文章 12 获赞 2 访问量 2293

猜你喜欢

转载自blog.csdn.net/qq_40832960/article/details/104126526