测试反馈修改完成

master
Lee-1203 2022-02-14 17:17:34 +08:00
parent bf89e47760
commit 400925e37e
2 changed files with 73 additions and 74 deletions

View File

@ -329,78 +329,5 @@
</div>
</footer>
</body>
<script type="text/javascript">
if(screen.width <= 980){
let navTop = $(".pull-item").offset().top-70;
let abstractTop = $(".abstract-bg").offset().top-129;
let speechTop = $(".speech-bg").offset().top-129;
let teamTop = $(".team-bg").offset().top-129;
let organizationTop = $(".organization-bg").offset().top-129;
let memorabiliaTop = $(".memorabilia-bg").offset().top-129;
$(window).bind("scroll",function(){
let topScroll=$(this).scrollTop();//当前窗口的滚动距离
if(topScroll > navTop){
$(".pull-item").addClass("pull-item-fixed")
}else{
$(".pull-item").removeClass("pull-item-fixed")
}
if(topScroll > abstractTop){
$(".pull-item li").removeClass("cur");
$(".abstract-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop){
$(".pull-item li").removeClass("cur");
$(".speech-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop){
$(".pull-item li").removeClass("cur");
$(".team-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop){
$(".pull-item li").removeClass("cur");
$(".organization-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop & topScroll > memorabiliaTop){
$(".pull-item li").removeClass("cur");
$(".memorabilia-btn").addClass("cur");
}
});
}else{
let navTop = $(".pull-item").offset().top-90;
let abstractTop = $(".abstract-bg").offset().top-149;
let speechTop = $(".speech-bg").offset().top-149;
let teamTop = $(".team-bg").offset().top-149;
let organizationTop = $(".organization-bg").offset().top-149;
let memorabiliaTop = $(".memorabilia-bg").offset().top-149;
$(window).bind("scroll",function(){
let topScroll=$(this).scrollTop();//当前窗口的滚动距离
if(topScroll > navTop){
$(".pull-item").addClass("pull-item-fixed")
}else{
$(".pull-item").removeClass("pull-item-fixed")
}
if(topScroll > abstractTop){
$(".pull-item li").removeClass("cur");
$(".abstract-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop){
$(".pull-item li").removeClass("cur");
$(".speech-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop){
$(".pull-item li").removeClass("cur");
$(".team-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop){
$(".pull-item li").removeClass("cur");
$(".organization-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop & topScroll > memorabiliaTop){
$(".pull-item li").removeClass("cur");
$(".memorabilia-btn").addClass("cur");
}
});
};
</script>
<script src="./js/about.js" type="text/javascript" charset="utf-8"></script>
</html>

72
js/about.js Normal file
View File

@ -0,0 +1,72 @@
if(screen.width <= 980){
let navTop = $(".pull-item").offset().top-70;
let abstractTop = $(".abstract-bg").offset().top-129;
let speechTop = $(".speech-bg").offset().top-129;
let teamTop = $(".team-bg").offset().top-129;
let organizationTop = $(".organization-bg").offset().top-129;
let memorabiliaTop = $(".memorabilia-bg").offset().top-129;
$(window).bind("scroll",function(){
let topScroll=$(this).scrollTop();//当前窗口的滚动距离
if(topScroll > navTop){
$(".pull-item").addClass("pull-item-fixed")
}else{
$(".pull-item").removeClass("pull-item-fixed")
}
if(topScroll > abstractTop){
$(".pull-item li").removeClass("cur");
$(".abstract-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop){
$(".pull-item li").removeClass("cur");
$(".speech-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop){
$(".pull-item li").removeClass("cur");
$(".team-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop){
$(".pull-item li").removeClass("cur");
$(".organization-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop & topScroll > memorabiliaTop){
$(".pull-item li").removeClass("cur");
$(".memorabilia-btn").addClass("cur");
}
});
}else{
let navTop = $(".pull-item").offset().top-90;
let abstractTop = $(".abstract-bg").offset().top-149;
let speechTop = $(".speech-bg").offset().top-149;
let teamTop = $(".team-bg").offset().top-149;
let organizationTop = $(".organization-bg").offset().top-149;
let memorabiliaTop = $(".memorabilia-bg").offset().top-149;
$(window).bind("scroll",function(){
let topScroll=$(this).scrollTop();//当前窗口的滚动距离
if(topScroll > navTop){
$(".pull-item").addClass("pull-item-fixed")
}else{
$(".pull-item").removeClass("pull-item-fixed")
}
if(topScroll > abstractTop){
$(".pull-item li").removeClass("cur");
$(".abstract-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop){
$(".pull-item li").removeClass("cur");
$(".speech-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop){
$(".pull-item li").removeClass("cur");
$(".team-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop){
$(".pull-item li").removeClass("cur");
$(".organization-btn").addClass("cur");
}
if(topScroll > abstractTop & topScroll > speechTop & topScroll > teamTop & topScroll > organizationTop & topScroll > memorabiliaTop){
$(".pull-item li").removeClass("cur");
$(".memorabilia-btn").addClass("cur");
}
});
};