CSS 实现隐藏滚动条同时又可以滚动内容
<div class="outer_div"> <div class="inner_div"> <div>我是内容</div> </div> </div>
.outer_div { position: relative; overflow: hidden; width: 200px; height: 200px; } .inner_div { position: absolute; left: 10px; right: -20px; top: 0; bottom: 0; overflow-x: hidden; overflow-y: scroll; }
ok,有了以上的代码就可以轻松的实现效果啦!
相关推荐
vavid 2018-04-15
ajhongshaorou 2019-06-29
liusure0 2011-09-27
切慕溪水 2019-11-03
武林半侠 2019-06-29
gigipop 2019-06-28
dangzhangjing 2019-06-27
语帆 2015-04-15
zhouguizhi 2013-02-28
AlisaClass 2012-11-20
淡风wisdon大大 2012-08-16
SuiKaSan的自学室 2012-08-11
AnyBisks 2011-11-27
startXUEBA 2011-07-19
xiaohuli 2011-05-11
Ydgent 2012-07-28
Juey 2017-07-21