gpt4 book ai didi

html - 使用 bootstrap css 时如何将按钮置于文本下方?

转载 作者:太空宇宙 更新时间:2023-11-03 23:13:58 24 4
gpt4 key购买 nike

我的文本下方有一个按钮(参见 fiddle http://jsfiddle.net/Leytgm3L/6/ ),我想将它居中,我实际上添加了这一行:

margin: 0 auto;

这个按钮的css代码,但是没有用...我怎样才能使它居中?

最佳答案

用“文本中心”类将其包装在一个 div 中。

<div class="text-center">
<a href="#about" class="learn-btn animated fadeInUp">Learn more<i class="fa fa-arrow-down"></i></a>
</div>

https://jsfiddle.net/Leytgm3L/8/

“text-center”类是具有“text-align: center”属性的 Bootstrap 帮助类。

参见:

http://getbootstrap.com/css/#type-alignment

关于html - 使用 bootstrap css 时如何将按钮置于文本下方?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31462433/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com