作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我想在网页中有两列,每一列都有自己的滚动条,而不是两者都使用的通用滚动条。例如,我的想法是沿着新的 twitter ui.. 如果列表长于高度,则一列显示带有滚动条的列表,类似地,另一列显示带有自己滚动条的详细信息。
我只是迷失了前进的方向,我是否需要使用框架来实现这一目标。是否可以抑制全局滚动条,每列使用自己的带有 css 的滚动条?
最佳答案
HTML:
<html>
<body>
<div class='right'>
<!-- data -->
</div>
<div class='left'>
<!-- data -->
</div>
</body>
</html>
CSS:
body{
overflow:hidden; /* This will remove the default scroll, not really needed, safer nonetheless */
}
.right, .left{
overflow:auto; /* This will add a scroll when required */
width:50%;
float:left;
height: 100%
}
关于html - 如何在网页中创建两个独立的栏目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4614306/
我是一名优秀的程序员,十分优秀!