nanoscroller 滚动条在火狐浏览器底下 右边被遮挡的问题

正文开始

其实是新老版本的css样式差异导致 可以用beyondcompare自行对比。 老版本有问题:

/** initial setup **/
.nano {
    position : relative;
    width    : 100%;
    height   : 100%;
    overflow : hidden;
}
.nano > .nano-content {
    position      : absolute;
    overflow      : scroll;
    overflow-x    : hidden;
    top           : 0;
    right         : 0;
    bottom        : 0;
    left          : 0;
    outline: none;
    scrollbar-width: none;
}

.nano > .nano-content::-webkit-scrollbar {
    display: none;
}
.has-scrollbar > .nano-content::-webkit-scrollbar {
    display: block;
}
.nano > .nano-pane {
    background-color: #f8f8f8;
    position   : absolute;
    width      : 9px;
    right      : 0;
    top        : 0;
    bottom     : 0;
    visibility : hidden\9; /* Target only IE7 and IE8 with this hack */
    opacity    : .01;
    -webkit-transition    : .2s;
    -moz-transition       : .2s;
    -o-transition         : .2s;
    transition            : .2s;
    -moz-border-radius    : 5px;
    -webkit-border-radius : 5px;
    border-radius         : 5px;
}
.nano > .nano-pane > .nano-slider {
    background: rgba(137, 160, 179, 0.5);
    transform: translate(0px, 85.7732px);
    position              : relative;
    margin                : 0 1px;
    -moz-border-radius    : 3px;
    -webkit-border-radius : 3px;
    border-radius         : 2px;
}
.nano:hover > .nano-pane, .nano-pane.active, .nano-pane.flashed {
    visibility : visible\9; /* Target only IE7 and IE8 with this hack */
    opacity    : 0.99;
}

新版本无问题:


/** initial setup **/ .nano { position : relative; width : 100%; height : 100%; overflow : hidden; } .nano > .nano-content { position : absolute; overflow : scroll; overflow-x : hidden; top : 0; right : 0; bottom : 0; left : 0; } .nano > .nano-content:focus { outline: thin dotted; } .nano > .nano-content::-webkit-scrollbar { display: none; } .has-scrollbar > .nano-content::-webkit-scrollbar { display: block; } .nano > .nano-pane { background : rgba(0,0,0,.25); position : absolute; width : 10px; right : 0; top : 0; bottom : 0; visibility : hidden\9; /* Target only IE7 and IE8 with this hack */ opacity : .01; -webkit-transition : .2s; -moz-transition : .2s; -o-transition : .2s; transition : .2s; -moz-border-radius : 5px; -webkit-border-radius : 5px; border-radius : 5px; } .nano > .nano-pane > .nano-slider { background: #444; background: rgba(0,0,0,.5); position : relative; margin : 0 1px; -moz-border-radius : 3px; -webkit-border-radius : 3px; border-radius : 3px; } .nano:hover > .nano-pane, .nano-pane.active, .nano-pane.flashed { visibility : visible\9; /* Target only IE7 and IE8 with this hack */ opacity : 0.99; }

对比图:

正文结束

js 正则替换返回值做回调函数 js获取浏览器网址里的参数