在 twitter bootstrap 中,导航栏和导航药丸有什么区别? [英] In twitter bootstrap, what is the difference between the navbar and nav pills?

查看:25
本文介绍了在 twitter bootstrap 中,导航栏和导航药丸有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览 twitter bootstrap 的组件,我发现导航组件有两个独立的部分,一个是导航栏,另一个是导航丸/标签等.

I was going through the components of twitter bootstrap and I found that there are two separate sections of navigational components, one is the Navbar and the other is the Nav-pills/tabs etc.

Navbar 似乎与 nav-pills 非常相似,任何人都可以强调它们之间的区别以及何时使用它们中的任何一个,因为文档对此并不十分清楚.

Navbar seems to be very similar to nav-pills, can anyone please highlight the difference between them and when to use either one of them as the the documentation is not really clear about this.

导航栏:

"首先,导航栏是静态的(不固定在顶部)并且包括支持项目名称和基本导航.随处放一个在 .container 中,它设置您的网站和内容的宽度"

"To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container, which sets the width of your site and content"

导航药丸:

取自引导程序文档

推荐答案

Navbar 旨在使您网站的所有页面通用(支持项目名称"是指向主页的链接),而导航药丸可能是特定于导航栏的到一个页面或一个部分.

Navbar aims to be common to all pages of your site ("support for a project name" is the link to homepage) whereas nav pills may be a navbar specific to a page or a section.

基本上,导航栏是独一无二的,并提供指向您网站主要部分的链接.导航药丸可能会提供指向您的页面锚点的内部链接...

Basically, navbar is unique and provides links to main parts of your site. Nav pills may provide internal links to your page anchors...

但这无论如何都是您的决定,具体取决于您对菜单呈现的偏好.

But this is your decision anyway, depending on your preferences for menu rendering.

这篇关于在 twitter bootstrap 中,导航栏和导航药丸有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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