css - 居中对齐 Bootstrap 中的导航栏内容

标签 css bootstrap-modal

我正在尝试将导航栏链接居中。但遗憾的是,到目前为止我运气不佳。我试过使用 navbar-justified,但这只会让所有事情都不成比例。

here is the code .

最佳答案

我假设您想将所有内容都集中到中心。最简单的方法是在父元素上使用 display: inline-block 然后使用 text-align: center。然后还重置 float 以使用默认对齐方式:

看到你更新的演示:http://www.bootply.com/iu9NOXfmEV

关于css - 居中对齐 Bootstrap 中的导航栏内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37503132/

相关文章:

html - 如何在 Bootstrap 中叠加?

jquery - 使用 jQuery 显示文本文件时如何保留换行符

css - 在 CSS 中混合 @media 查询并使用 @supports

javascript - 按 Enter 键而不是单击鼠标(Angular modal-已附加 Plunker)

javascript - Bootstrap : modal. js v3.2.0 嵌套弹窗

javascript - 删除用于复制 + 粘贴的富文本格式? (跨浏览器)

html - 根据父 Div 设置 Div 高度

未为 Bootstrap Modal 定义 Javascript 函数

angular - Protractor 测试引导模式 - 不是 Angular 页面 - 超时

html - 有些按钮有 :focus style applied on click