el-button按钮居中实现方法
<div style="text-align: center">
<el-button type="success" style=" margin-top: 10px;">结果准确</el-button>
<el-button type="warning" style=" margin-top: 10px; margin-left: 20%">结果矫正</el-button>
</div>
需要将想要居中的按钮放在div中,然后通过设置text-align
属性为center
即可实现。
效果如下图:
![在这里插入图片描述](https://img-blog.csdnimg.cn/9456e770aada4848b8ab46a3ccf4d985.png)