码迷,mamicode.com
首页 > 其他好文 > 详细

消除滚动条的方法

时间:2017-08-14 21:27:34      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:nbsp   rac   com   over   scroll   log   兼容性   images   span   

方法一:不支持IE和火狐,移动端和谷歌浏览器没问题,只需要css即可设置

 

body{height:2000px;background:gray;}
            ::-webkit-srollbar-track-piece{background:none;-webkit-border-radius:0}
            ::-webkit-scrollbar{width:8px;height:8px}
            ::-webkit-scrollbar-thumb:vertical{height:50px;background-color:#bbbbbb;-webkit-border-radius:4px;outline:0px solid #ffffff;ouline-offset:-2px;border:2px solid #ffffff}
            ::-webkit-scrollbar-thumb:hover{height:50px;background-color:#999999;-webkit-border-radius:4px}
            ::-webkit-scrollbar-thumb:horizontal{width:50px;background-color:#bbbbbb;-webkit-border-radius:4px;outline:0px solid #ffffff;ouline-offset:-2px;border:2px solid #ffffff}

 

方法二:标签配合css实现,这种方法相对麻烦,但是兼容性好

 

 

  技术分享

 

消除滚动条的方法

标签:nbsp   rac   com   over   scroll   log   兼容性   images   span   

原文地址:http://www.cnblogs.com/LChenglong/p/7359945.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!