zoukankan      html  css  js  c++  java
  • 锚点跳转

    1、方法一:href="#div1"

     <h2>
            <a href="#div1">to div1</a>
            <a href="#div2">to div2</a>
            <a href="#div3">to div3</a>
        </h2>
        <div id="div1">div1</div>
        <div id="div2">div2</div>
        <div id="div3">div3</div>

    2、方法二:js页面滚动

    // 锚点跳转
        $('.Step_points .box2 .list li').each(function(){
            $(this).on('click',function(){
                 $("html, body").animate({scrollTop: $(".bloginfo_sec").eq($(this).index()).offset().top }, {duration: 500,easing: "swing"});
            });
        })
  • 相关阅读:
    GIT
    curl
    排序算法
    《软件设计师》考点分布
    lua第三方库
    WordPress
    go http
    Unity UI相关总结
    note
    LUA重难点解析
  • 原文地址:https://www.cnblogs.com/ghfjj/p/7920144.html
Copyright © 2011-2022 走看看