Commit ccd47f38 authored by lixy's avatar lixy

关于欣新-定位

parent e7e8b7bb
...@@ -191,20 +191,20 @@ ...@@ -191,20 +191,20 @@
let top = document.querySelector('#'+id).offsetTop; let top = document.querySelector('#'+id).offsetTop;
if(id == "history01"){ if(id == "history01"){
if(this.barFixed){ if(this.barFixed){
document.documentElement.scrollTop = top - 220; document.body.scrollTop = document.documentElement.scrollTop = top - 220;
} else { } else {
document.documentElement.scrollTop = top - 301; document.body.scrollTop = document.documentElement.scrollTop = top - 301;
} }
this.tabIndex = 0; this.tabIndex = 0;
} else if(id == "history02"){ } else if(id == "history02"){
this.tabIndex = 1; this.tabIndex = 1;
document.documentElement.scrollTop = top - 260; document.body.scrollTop = document.documentElement.scrollTop = top - 260;
} else if(id == "history03"){ } else if(id == "history03"){
this.tabIndex = 2; this.tabIndex = 2;
document.documentElement.scrollTop = top - 260; document.body.scrollTop = document.documentElement.scrollTop = top - 260;
} else if(id == "history04"){ } else if(id == "history04"){
this.tabIndex = 3; this.tabIndex = 3;
document.documentElement.scrollTop = top - 260; document.body.scrollTop = document.documentElement.scrollTop = top - 260;
} }
this.barFixed = true; this.barFixed = true;
}, },
......
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 to comment