Commit 89156b9e by doszhang

dos

parent f124092a
...@@ -163,7 +163,7 @@ function ruleScroll() { ...@@ -163,7 +163,7 @@ function ruleScroll() {
let blockHeight = $('.rule-block').height() / fontSize; //rem let blockHeight = $('.rule-block').height() / fontSize; //rem
let wrapHeight = 155; //rem let wrapHeight = 155; //rem
let scrollHeight = wrapHeight - blockHeight; //rem let scrollHeight = wrapHeight - blockHeight; //rem
let step = (39 / scrollHeight) * fontSize; let step = (39 * fontSize) / (scrollHeight * fontSize);
let scrollTop = $('.rule-block').scrollTop(); let scrollTop = $('.rule-block').scrollTop();
$('.scroll-bar').css('top', scrollTop * step + 'px'); $('.scroll-bar').css('top', scrollTop * step + 'px');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment