<p id='p3' style='width:200px;height:200px;overflow:auto;'>
This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.This is some text. This is some text. This is some text. This is some text.
</p>
就像上面代码 p里面有一段文字,我设置了overflow:auto;也就是超出部分显示滚动条,那么我如何修改这个滚动条的样式呢?
一个针对Webkit内核浏览器的滚动条美化的例子,不知道是不是你想要的
那就定义浏览器滚动条样式即可,两者是一致的,如果需要不一样,那就需要模拟滚动条
推荐你参考这篇文章:http://www.qianduan.net/css-custom-scroll-bar-style/
作者是微信团队的神飞,写的文章一直很不错!
话说滚动更改滚动条样式。为什么pc端可以正常显示。手机端就不行了呢