html - 如何使用 twbs :bootstrap in Meteor 将超大屏幕中的所有内容居中

标签 html css twitter-bootstrap meteor

我已经做了好几个小时,尝试了所有方法,但我无法让这些按钮移动。

我不确定如何覆盖 CSS 来执行任何边距技巧。

我所需要的只是让超大屏幕、文本和按钮组中的所有内容都完美居中。

<template name="Jumbotron">
<div class="jumbotron center">
    <h1>Hello, world!</h1>
    <p>Get Started Now</p>
        <div class="btn-toolbar">
            <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
            <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
        </div>
</div>
</template>

最佳答案

btn-toolbar 类的显示属性更改为 inline-block。

参见示例片段。

.btn-toolbar.meteor-btn-toolbar,
.btn-toolbar.meteor-btn-toolbar2 {
  display: inline-block;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron text-center">
  <h1>Hello, world!</h1>

  <p>Get Started Now</p>
  <div class="btn-toolbar meteor-btn-toolbar" role="toolbar" aria-label="...">
    <div class="btn-group" role="group" aria-label="..."> <a role="button" class="btn btn-primary btn-lg">Learn More</a>
      <a role="button" class="btn btn-primary btn-lg">Learn More</a>

    </div>
  </div>
</div>
<hr>
<div class="jumbotron text-center">
  <h1>Hello, world!</h1>

  <p>Get Started Now</p>
  <div class="btn-toolbar meteor-btn-toolbar2"> <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
    <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>

  </div>
</div>

关于html - 如何使用 twbs :bootstrap in Meteor 将超大屏幕中的所有内容居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33787750/

相关文章:

从 JSON 或类似数据生成/呈现动态 HTML 表单的 JavaScript?

JavaScript:如何以编程方式确定网络 "fold"?

javascript - HTML 中的 UINavigationController 类型菜单

javascript - 为 <div> 中用逗号分隔的文本应用不同的 css

CSS:另一个绝对DIV内的绝对DIV

javascript - Ng-disabled 无法与 AngularStrap 版本的 Bootstrap 日期和时间选择器一起使用

css - Bootstrap 选项卡中 div 的 100% 高度

html - 如何内嵌 3 个 div,最后使用自动宽度?

css - 具有模糊效果的整页响应式背景图片

javascript - 如何使用 CSS/JS 或 jquery 让文本随滚动在 colspan 中 float ?