Jumbotron行为不正常

时间:2015-04-07 12:25:40

标签: twitter-bootstrap

我是网页设计的新手,现在我正在使用bootstrap(在教程之后),一切都很棒,但是jumbotron的表现并不像它应该的那样,即使是容器类,它也没有将元素与中心对齐..

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Getting Started With Bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>

<body>
<div class="container">
  <div class="jumbotron">
    <div class="container">
      <img src="frame_aad_aksi.png">
      <h1>Bootstrap Tutorial</h1> 
      <p>Bootstrap is the most popular HTML, CSS, and JS framework for developing
      responsive, mobile-first projects on the web.</p> 
    </div>
  </div>
</div>

<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

像这样,你的意思是另一件事吗?

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Getting Started With Bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <div class="jumbotron text-center">
            <div class="container">
                <img src="frame_aad_aksi.png">
                <h1>Bootstrap Tutorial</h1>
                <p>Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web.</p>
            </div>
        </div>
    </div>
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>