滚动条滚动到指定位置

function scrollToCenter(){
    var div = $("#canvas-wrap");
    var top = (div[0].scrollHeight - div.height()) / 2;
    div[0].scrollTop = top;
}
原文地址:https://www.cnblogs.com/linsx/p/7221788.html