2012-12-17 40 views
0

我试图在浏览器宽度最大化时使Bootstrap启发式网格(小提琴下方)的内容居中。我希望看到屏幕中央有4块和5块。我可以申请哪些CSS来实现此目的?center CSS中的Bootstrap内容

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <title>Scaffolding · Bootstrap</title> 
    <link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"> 
    <link href="http://twitter.github.com/bootstrap/assets/css/docs.css" rel="stylesheet"> 
</head> 
<body> 
    <div class="row"> 
     <div class="span9"> 
      <div class="row show-grid"> 
       <div class="span4"> 
        4</div> 
       <div class="span5"> 
        5</div> 
      </div> 
     </div> 
    </div> 
</body> 
</html> 
​ 

Fiddle

回答

1

给你body标记的类container。这应该将divrow类别对齐。

<body class="container">