css - 为什么 Bootstrap Jumbotron 不渲染?

标签 css twitter-bootstrap

我正在使用 Jumbotron 示例中的代码:http://getbootstrap.com/components/#jumbotron .我的例子中的超大屏幕 Angular 没有圆 Angular ,文本也没有居中。我做错了什么?

<!DOCTYPE html>
<html>

<head>
  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

  <!-- Optional theme -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

  <!-- Latest compiled and minified JavaScript -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>

<body>
  <div style="width:600px">
    <header class="jumbotron">
      <h1>My Famous Webpage</h1>
    </header>
  </div>
</body>

</html>

https://plnkr.co/edit/62cdPp29PtjfldEbGGra?p=preview

最佳答案

请试试这个:

将您的 div 放在类为容器的 div 中。

<div class="container">
<div style="width:600px">
            <header class="jumbotron">
            <h1>My Famous Webpage</h1>
        </header>
        </div>
</div>

关于css - 为什么 Bootstrap Jumbotron 不渲染?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36104287/

相关文章:

javascript - Bootstrap 轮播 : Make download next image when using background-image on div instead of img

html - CSS - 媒体查询最大宽度设置为在 729px 处隐藏 div 但在 657px 处隐藏

html - Bootstrap 对齐选择按钮和两个输入字段

html - 使用导航栏 Bootstrap 自定义 header

html - Bootstrap 3 的最佳实践方法

css - Bootstrap 相当于 HTML5Boilerplate 的 .visuallyhidden

html - 没有文字时如何修复高度dt和dd

javascript - 编辑 iframe 动态内容

html - 如何平均设置 flex 元素高度

jquery - 选中时更改类复选框