0
はここに私のページです: col-md-6でJumbotronを作成するには両側の中央に配置しますか?
問題がある、私のジャンボトロンは、ページの上部に配置しました。私はそれをセンターに移動したい(少し下に)。私は余白とパディングを無効にしようとしましたが、それでも動作しませんでした。どうすればいい?
ここ
<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だ私のHTMLです:
.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;
}
あなたはそれが垂直にセンターしたいと思っていますか?はいの場合は、ここで何度も議論されています。例:http://stackoverflow.com/questions/8865458/how-to-vertically-center-text-with-css –
あなたは一番上からではなく、一番下からパディングしました。 – Rogue