美文网首页
html按钮点击页面的滚动

html按钮点击页面的滚动

作者: 高坚果_ | 来源:发表于2021-09-08 14:40 被阅读0次
$('#Abottom').click(function () { $('html,body').animate({ scrollTop: '0px' }
, 800); 
$('#hedaDiv').removeAttr("style")});     //页面滚动至顶部
function navigationAid(e){
  let ids = e.id
  switch (ids) {
    case "uisj":
      $('html,body').animate({ scrollTop: '1300px' }, 800)
      break;
    case "csgcs":
      $('html,body').animate({ scrollTop: '1300px' }, 800)
      break;
    case "azkf":
      $('html,body').animate({ scrollTop: '1899px' }, 800)
      break;
    case "jbgcs":
      $('html,body').animate({ scrollTop: '1899px' }, 800)
      break;
    case "cpch":
      $('html,body').animate({ scrollTop: '2599px' }, 800)
      break;
    case "zjqdgcs":
      $('html,body').animate({ scrollTop: '2599px' }, 800)
      break;
    case "gjqdgcs":
      $('html,body').animate({ scrollTop: '3168px' }, 800)
      break;
    case "hdgcs":
      $('html,body').animate({ scrollTop: '3168px' }, 800)
      break;
    case "xzqt":
      $('html,body').animate({ scrollTop: '3999px' }, 800)
      break;
    case "xszy":
      $('html,body').animate({ scrollTop: '3999px' }, 800)
      break;
    case "nrtg":
      $('html,body').animate({ scrollTop: '4699px' }, 800)
      break;
    case "nryy":
      $('html,body').animate({ scrollTop: '4699px' }, 800)
      break;
    case "wabj":
      $('html,body').animate({ scrollTop: '5499px' }, 800)
      break;

    default:
      break;
  }
}

相关文章

网友评论

      本文标题:html按钮点击页面的滚动

      本文链接:https://www.haomeiwen.com/subject/dtyvwltx.html