html - Bootstrap 网格和跨度

标签 html css twitter-bootstrap grid

我在 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">&nbsp;</div>
<div class="col-md-6">&nbsp;</div>
</div>

此外,您关闭 1 个 div 太多了,</div>最后

关于html - Bootstrap 网格和跨度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26348417/

相关文章:

html - 不同视口(viewport)中的段落不在一起

css - 在 Bootstrap 下拉切换和下拉菜单之间添加空间

css - 垂直移动页面和高分辨率

html - 重新调整 prestashop 1.5 shome slider 的大小

javascript - 处理音频文件

html - 添加 margintop 或 bottom 到列表项

javascript - 如何使用 SASS 动态切换颜色主题?

html - 更改占位符不透明度

javascript - 存储在 Var 中并在 html 中调用的函数

css - 如何覆盖 Bootstrap 3 网格中的背景图像?