问题描述:隐藏滚动条支持滚动的css方法
解决方法:通过简单的布局及css的方法实现
先看下代码
代码片段:
html:
<div id="parent">
<div id="child">
内容
11111
22222
33333
44444
55555
66666
77777
</div>
</div>
在项目需要的地方包上这两层div,然后css规范样式
css:
#parent {
width: 100%;
height: 100%;
overflow: hidden;
}
#child {
width: 100%;
height: 100%;
overflow-y: scroll;
padding-left: 15px;
}
这样就实现效果了。