Bootstrap页脚 - 如何将其对齐并给出间距 [英] Bootstrap footer - How to align it to the right and give spacing

查看:73
本文介绍了Bootstrap页脚 - 如何将其对齐并给出间距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:

<footer>
        <p>© Company 2014</p><a href="#">Pricing</a><a href="#">Contact</a><a href="#">Terms</a>
</footer>

我试图不仅将链接对齐到右边,它们不是直接相邻的。

I'm trying to not only align the links to the right but also give each one a spacing so they are not directly next to each other.

我知道我可以浮动它,并给它不是自己的CSS,但我试图避免使用自定义CSS,是有

I know I can float it right and give it isn't own CSS but im trying to avoid using custom CSS, is there any css classes or html markup I can add from bootstrap to get this effect without having to add custom rules?

推荐答案

请参阅 Bootply

    <footer>
      <p class="pull-left">© Company 2014</p>
      <div class="pull-right">
          <ul class="list-inline">
             <li><a href="#">Pricing</a></li>
             <li><a href="#">Contact</a></li>
             <li><a href="#">Terms</a></li>
          </ul>
      </div>
    </footer>

list-inline 单行使用 inline-block 和额外的填充。它是一个Bootstrap实用程序。

The list-inline utility places everything in a single line using inline-block with extra padding. It is a Bootstrap utility.

这篇关于Bootstrap页脚 - 如何将其对齐并给出间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆