如何在引导程序 3 中将选项卡与顶部/右侧对齐? [英] How to align tabs to top/right in bootstrap 3?

查看:42
本文介绍了如何在引导程序 3 中将选项卡与顶部/右侧对齐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将引导程序 3 选项卡向右而不是向左对齐.

I need to align bootstrap 3 tabs to right instead of left.

是否可以使用 bootstrap css 或者我需要使用自定义 css 吗?

Is it possible with usage of bootstrap css or do I need to use custom css ?

推荐答案

使用 .navbar-right 类将元素推到导航栏中的右侧,或 .pull-right 在不在导航栏中时也做同样的事情.

Use the class .navbar-right to push an element to the right within a navbar, or .pull-right to do the same when not in a navbar.

<ul class="nav nav-tabs navbar-right">
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">Tab1</a></li>
    <li><a href="#">Tab2</a></li>
</ul>

很高兴在这里了解其他帮助程序类:http://getbootstrap.com/css/#helper-classes

Good to know the other helper-classes here too: http://getbootstrap.com/css/#helper-classes

这篇关于如何在引导程序 3 中将选项卡与顶部/右侧对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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