标签:height 执行 slim element scroll scrolltop code lims div
父节点的class是slimScrollDiv
子节点的class是fa-warning
执行这个js
document.getElementsByClassName("slimScrollDiv")[0].scrollTo(0, $(".fa-warning").eq(0).offset().top + document.getElementsByClassName("slimScrollDiv")[0].scrollTop - $(".slimScrollDiv").offset().top - $(".slimScrollDiv").height()/2);
标签:height 执行 slim element scroll scrolltop code lims div
原文地址:https://www.cnblogs.com/theone67/p/11213324.html