jqmobi如何修改右侧滚动条的颜色
作者:本站编辑 发布时间:2015-11-24 来源:本站原创
点击数:
找到 plugins\af.scroller.js
然后搜索
function createScrollBar
找到如下代码:
function createScrollBar(width, height) {
var scrollDiv = document.createElement("div");
scrollDiv.style.position = "absolute";
scrollDiv.style.width = width + "px";
scrollDiv.style.height = height + "px";
scrollDiv.style[$.feat.cssPrefix + "BorderRadius"] = "2px";
scrollDiv.style.borderRadius = "2px";
scrollDiv.style.display="none";
scrollDiv.className = "scrollBar";
scrollDiv.style.background = "black";
return scrollDiv;
}
其中 scrollDiv.style.background = "black"; 就是右侧滚动条的颜色修改为:function createScrollBar(width, height) { var scrollDiv = document.createElement("div"); scrollDiv.style.position = "absolute"; scrollDiv.style.width = width + "px"; scrollDiv.style.height = height + "px"; scrollDiv.style[$.feat.cssPrefix + "BorderRadius"] = "2px"; scrollDiv.style.borderRadius = "2px"; scrollDiv.style.display="none"; scrollDiv.className = "scrollBar"; scrollDiv.style.background = "rgb(210,210,210)"; return scrollDiv; }