Commit f124092a by doszhang

dos

parent f305470a
...@@ -160,10 +160,10 @@ $(document).ready(function () { ...@@ -160,10 +160,10 @@ $(document).ready(function () {
function ruleScroll() { function ruleScroll() {
//7.9-46.9 //7.9-46.9
let blockHeight = $('.rule-block').height() / fontSize; let blockHeight = $('.rule-block').height() / fontSize; //rem
let wrapHeight = 155; let wrapHeight = 155; //rem
let scrollHeight = wrapHeight - blockHeight; let scrollHeight = wrapHeight - blockHeight; //rem
let step = (scrollHeight / 39) * fontSize; let step = (39 / 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