本文实例为大家分享了javascript实现滚动条效果的具体代码,供大家参考,具体内容如下
document html, body { height: 100%; margin: 0; } #container { position: absolute; top: 50px; left: 100px; height: 400px; width: 150px; background-color: aliceblue; padding: 2rem; box-sizing: border-box; overflow-y: hidden; position: relative; padding-right: 30px; } .scrollbar { height: 50px; width: 10px; border-radius: 20px; background: #ccc; position: absolute; right: 0; } fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
fefe
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



