2016-09-16 8 views
1
<div class="container-full-bg" style="background-image:url('background.jpg');"> 
<div class="container special"> 
    <div class="jumbotron"> 
     <div class="row push-to-bottom"> 
      <div class="col-md-6"> 
      </div> 
      <div class="col-md-6"> 
       <p style="color:#fff;"><span style="color:red;font-size:100px;"> 1</span>/10</p> 
      </div> 
     </div> 
    </div> 
</div> 
<img src="xxx"/> 

ポジション行/コンテナ

は、だから私は上記のコードを持っており、それは動作しますが、唯一のものは、私が行/ COL-MD-6の者を配置したいということです容器の底部。私は位置を適用しようとしました:絶対;および底部:0;それはページの一番下に位置し、 "1/10"を左に置くだけです。私はそれをコンテナの中に入れておきたいのですが、私はその修正を見つけることができません!

私には何が欠けていますか?

編集:私は親のdivに絶対位置を与えてから絶対位置を適用しようとしました。bottom:0;それでもまだ動作しません。

答えて

0

position: relative.containerまたは.jumbotron要素に指定する必要があります。このようにして、.push-to-bottom divにposition: absolute;bottom: 0;を設定することができます。

EDIT:あなたのコメントに基づいて

あなたはこのようにそれを行うことができます:

html, 
body { 
    height: 100%; 
    width: 100%; 
} 
.jumbotron { 
    background-color: inherit; 
} 
.container-full-bg { 
    width: 100%; 
    height: 40%; 
    max-width: 100%; 
    background-position: center; 
    background-size: cover; 
} 
.container-full-bg .container, 
.container-full-bg .container .jumbotron { 
    height: 100%; 
    width: 100%; 
} 
.jumbotron { 
    position: relative 
} 
.jumbotron p { 
    font-size: 60px; 
    font-weight: 500; 
} 
.push-to-bottom { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
} 

ここJSFiddleです:http://jsfiddle.net/thepio/Lnacr8kn/

+0

ありがとう!そんなことはありますが、 "1/10"が左に浮かんで、私はフィドルを作りました http://jsfiddle.net/knuhgLos/ – Richie

+0

どこに配置したいのですか? – thepio

+0

http://i.imgur.com/aaWmHct.pngちょうどこのように、しかし底部に位置しています。まだブートストラップのグリッドに! – Richie