笔者在制作登陆网页的时候,发现让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/>
是换行符
效果如图: