2016-03-19 4 views
0

Jumbotronのコードのコードを使用しています:http://getbootstrap.com/components/#jumbotron。私の例のジャンボトロンのコーナーは丸められておらず、テキストは中央に配置されていません。私は間違って何をしていますか?ブートストラップジャンブトロンレンダリングはなぜですか?

<!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

答えて

2

これを試してください:

は、そのクラスのコンテナであるdivの内側にあなたのdivを入れてください。

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

ありがとうございました。私はplnkr.coを更新しました。丸みを帯びたコーナーが現れました。どのようにテキストを中央に置くことができるか知っていますか? – 4thSpace

+0

あなたのCSSでこれを試してください: .jumbotron h1 {text-align:center} – satya

+0

優秀!ありがとう。 – 4thSpace

関連する問題