为什么我的header
不fixed
到column
。
<div class="container-fluid full-ht">
<div class="row full-ht">
<div class="col-sm-4 full-ht">
<div class="patient-column full-ht">
<div class="fixed-header">
Fixed Header
</div>
Some content follows
</div>
</div>
</div>
</div>
我希望header
在column
发生时固定在vertical-scrolling
内。
http://www.bootply.com/tducyvW5u1
答案 0 :(得分:3)
你应该使用
position:fixed
。
用于固定标题,在滚动时实现固定标题
<强> CSS 强>
.fixed-header {
position: fixed; // changed position:absolute to fixed
width: 100%;
top: 0;
padding: 15px;
}
答案 1 :(得分:0)
在我的CSS中,我会添加!important
并将absolute
设为fixed
并将其作为优先事项。
.fixed-header {
position: fixed; !important
width: 100%;
top: 0;
padding: 15px;
}