2016-07-04 2 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>

하여이 작업을 수행 할 수 있습니다
관련 문제