首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使巨型加速器在col md-6中放置在正中两侧?

如何使巨型加速器在col md-6中放置在正中两侧?
EN

Stack Overflow用户
提问于 2016-12-24 01:01:42
回答 0查看 117关注 0票数 0

这是我的页面:

问题是,我的Jumbotron放在页面的上方。我想把它移到中间(下面稍微低一点)。我尝试了覆盖空白处和填充,但它仍然不起作用。我该怎么做呢?

这是我的HTML

代码语言:javascript
复制
<div class="col-md-6">
    <div class="welcome-page-eat">
        <div class="jumbotron">
            <h2>
                Hello, world!
            </h2>
            <p>
                This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.
            </p>
            <p>
                <a class="btn btn-primary btn-large" href="#">Learn more</a>
            </p>
        </div>
    </div>
</div>

下面是我的CSS:

代码语言:javascript
复制
.welcome-page-eat {
    background: url(../images/front_page/eat.jpg) no-repeat right 0;
    margin-right: -15px;
    margin-left: -15px;
    padding-bottom: 62.5%;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
}

.welcome-page-cook {
    background: url(../images/front_page/cook.jpg) no-repeat right 0;
    margin-right: -15px;
    margin-left: -15px;
    padding-bottom: 62.5%;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
}

.jumbotron {
    background-color: transparent;
    color: white;
}
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41305232

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档