我在 Bootstrap 主页上无法正常运行跨度和网格。我希望“联系人”和“商店营业时间”在跨度 6 处并排放置,但它们在其上方保存信息的英雄单元的宽度处彼此下方。我怎样才能掌握跨度?
home.html
<div class="center hero-unit">
<h1>Welcome</h1>
<h4>
//fill with store info
</h4>
</div>
<div class="span6">
<div class="center hero-unit">
<h1> Contact </h1>
<h4> 314.555.3000 </h4>
<h4> 100 St. Louis Ave </h4>
</div>
</div>
<div class="span6">
<div class="center hero-unit">
<h1> Store Hours </h1>
<h4> Monday - Thursday // 10:30 AM to 8:00 PM</h4>
<h4> Friday - Saturday // 10:30 AM to 9:00 PM</h4>
<h4> Sunday // Closed </h4>
</div>
</div>
</div>
样式表.css
.hero-unit {
text-align: center;
background-color: #99CCFF;
margin: 90px;
padding: 20px;
font-size: 11px;
line-height: 1.4em;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
box-shadow: 1px 1px 10px #444;
border-color: #3399FF;
}
最佳答案
嗯嗯,如果我没记错的话 Bootstrap 类是:“col-md-6”或“col-lg-6”等 此外,您需要将列包装在“行”中
你应该尝试这样的事情:
<div class="row">
<div class="col-md-6"> </div>
<div class="col-md-6"> </div>
</div>
此外,您关闭 1 个 div 太多了,</div>
最后
关于html - Bootstrap 网格和跨度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26348417/