方式一:
<div style="text-align:center">
<button>按钮居中</button>
</div>
方式二:
将button变成块状元素,使用margin居中
<div>
<button style="display:block;margin:0 auto">按钮居中</button>
</div>
方式一:
<div style="text-align:center">
<button>按钮居中</button>
</div>
方式二:
将button变成块状元素,使用margin居中
<div>
<button style="display:block;margin:0 auto">按钮居中</button>
</div>