84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
ul{ position: relative; width: 100%; height: 76px; border-top: 1px solid #d7d7d7; overflow-x: auto; }
这段代码会自动出现x轴的滚动条,但是在ios微信页面里面这个滚动条是透明的,我想把这个滚动条的做成一个带颜色的,请问css需要怎么写才行呢?
认证高级PHP讲师
Custom scroll bars are only supported by webkit-based browsers. Since the WeChat page is also webkit, it is logically supported. Then you can define the color like this (assuming I want a red scroll bar):
p::-webkit-scrollbar-thumb { border-radius: 5px; background: red; border: 0px solid #fff; }
The effect is as follows:
Custom scroll bars are only supported by webkit-based browsers. Since the WeChat page is also webkit, it is logically supported. Then you can define the color like this (assuming I want a red scroll bar):
The effect is as follows: