CSS 实现隐藏滚动条同时又可以滚动
![5640239-74ea24c508b46dae.png](https://upload-images.jianshu.io/upload_images/5640239-74ea24c508b46dae.png)
图片发自简书App
添加伪类之后的功能:
![5640239-242ee0de1db7d793.png](https://upload-images.jianshu.io/upload_images/5640239-242ee0de1db7d793.png)
图片发自简书App
完整demo如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
::-webkit-scrollbar {display:none}
</style>
</head>
<body>
<div style=" 200px; height: 200px; overflow-y: scroll;">
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
11111</br>
</div>
</body>
</html>
缺点,不兼容IE