2017-01-23 3 views
0

私はdivをしたいと思う "スクロール" 1つの場所に、スクロール中に滞在します。ここに私のコードは次のとおりです。スクロール中にDiv滞在。 CSS

.Scroll { 
 
    position: fixed; 
 
} 
 
.Down { 
 
    clear: both; 
 
}
<div class="container-fluid"> 
 
    <div class="Scroll"> 
 
    <div class="Down"> 
 
     <div class="form-group"> 
 
     <input type="text" class="form-control input-lg" placeholder="Search"> 
 
     </div> 
 
     <div class="form-group" style="display:inline-block;width:300px;"> 
 
     <h4><small>Select Date From <span class="glyphicon glyphicon-calendar"></span></small></h4> 
 
     <input type="date" class="form-control" style="width:250px;" class="form-control" /> 
 
     <h4><small>Select Date To <span class="glyphicon glyphicon-calendar"></span></small> </h4> 
 
     <input type="date" class="form-control" style="width:250px;" class="form-control" /> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div> 
 
<div class="Down"> 
 
    <table> 
 
    <thead> 
 
     <tr> 
 
     <th>NAME</th> 
 
     <th>DATE</th> 
 
     </tr> 
 
    </thead> 
 
    <tbody> 
 
     <tr ng-repeat="name in names"> 
 
     <td>{{name.name}}</td> 
 
     <td>{{name.date}}</td> 
 
     </tr> 
 
    </tbody> 
 
    </table> 
 
</div>

それは動作しません。事前にお返事ありがとうございます!

答えて

1

ただ、下記のようにposition:absoluteの代わりposition:fixedを追加します。

.Scroll { 
    /*position: fixed;*/ 
    position: absolute; 
} 
+0

それは動作しません。/ @FatehシンJagdeo – bafix2203

0

あなたがスクロールするのに十分な内容を持っている必要がありますまたはあなたがスクロールできるようにするつもりはありません。 次のCSSは、私が使用したものである:

.Scroll { 
display:block; 
    position: fixed; 
    top:100; 
    left:100; 
    background:#fff; 
} 
.Down { 
    clear: both; 
} 

私jsfiddleを参照してください:

https://jsfiddle.net/e63eyswp/1/

関連する問題