2016-07-04 3 views
-1

(Facebookの右側のセクションのように)セクションを作成したいと思います。固定されているが底部からのセクション。私がスクロールする限り、セクションはスクロールします。しかし、私がセクションの最後に到達すると、固定されて画面にとどまります。divを下から修正する

私は多分JS、それは純粋なCSSでこれを行うことは可能ではないと思う...

あなたはこれが起こる作るためのすべてのソリューションを持っていますか?

事前に感謝します。

答えて

0

ブートストラップを使用すると、これが簡単になります。あなたはnavbar-fixed-bottom

<!DOCTYPE html> 
 
<html lang="en"> 
 
<head> 
 
    <title>Bootstrap Case</title> 
 
    <meta charset="utf-8"> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> 
 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> 
 
</head> 
 
<body style="height:1500px"> 
 

 
<nav class="navbar-inverse navbar-fixed-bottom"> 
 
    <div class="container-fluid"> 
 
    <h3>Hello<h3> 
 
    </div> 
 
</nav> 
 
    
 
<div class="container"> 
 
    <h3>Fixed Navbar</h3> 
 
    <div class="row"> 
 
    <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p>  
 
    </div> 
 
    <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
    </div> 
 
    <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
    </div> 
 
    </div> 
 
</div> 
 
<h1>Scroll this page to see the effect</h1> 
 
    
 
    <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
    <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <div class="col-md-4"> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 
     <p>A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll.</p> 
 

 
</body> 
 
</html>

することによって、これを達成することができます
関連する問題