【发布时间】:2015-04-20 13:38:22
【问题描述】:
我在我的应用程序中使用引导程序进行布局。 整个页面被分割成2X2 div,
我想冻结第一行和第一列。我该怎么做?
下面是描述我的要求的图表。
【问题讨论】:
标签: javascript html css twitter-bootstrap
我在我的应用程序中使用引导程序进行布局。 整个页面被分割成2X2 div,
我想冻结第一行和第一列。我该怎么做?
下面是描述我的要求的图表。
【问题讨论】:
标签: javascript html css twitter-bootstrap
米塔利,试试这个,
使用position:fixed作为第一行
这是左侧框
.leftside {
display: inline-block;
float: left;
position: relative;
width: 250px (your value);
margin-top: 58px (your value);
background-color: #ccc;
height: 100%;
}
右侧框
.rightside {
margin-left: 250px;
min-height: 1000px (your value);
margin-top: 0px;
padding: 0px;
background-color: #eee;
overflow: auto;
position: relative;
}
【讨论】:
用 bootstrap 试试这个-
#sidebar.affix-top{
position: static;
margin-top:30px;
width:228px;
}
#sidebar.affix{
position: fixed;
top:70px;
width:228px;
}
【讨论】:
已经有几个例子了。
https://codepen.io/aifarfa/pen/jbMqba
https://jsfiddle.net/RMarsh/bzuasLcz/3/
https://www.jqueryscript.net/demo/jQuery-Plugin-To-Freeze-Table-Columns-Rows-On-Scroll/
Looks like I have to enter in code to show these links, this is for angular and jquery using html tables.
【讨论】: