我试过了但是没用,
https://jsfiddle.net/lucianopinochet/fzse5962/
如果有人有什么想法,我会非常感谢你。
.container article button{
align-self: center;
}
<div class="container">
<article>
<h3>Free</h3>
<h4>Forever Free Plan</h4>
<p>Our generous free forever plan provides you with plenty to get started and get addicted to the tools that will take your work to the next level. No credit card required to get started.</p>
<ul>
<li>Unlimited pages & links</li>
<li>Up to 5 gigabytes of storage</li>
<li>Up to 20 databases</li>
<li>Share up to 50 pages via URL</li>
<li>Up to two guest users per page</li>
</ul>
<button>Sign Up Now</button>
</article>
</div>
2条答案
按热度按时间sbtkgmzw1#
试试这个:
垂直和水平方向的按钮将以此代码居中。
c9qzyr3d2#
试试这个:
如果希望使用这些属性使按钮居中,请为父元素提供与示例中相同的属性。