如何用js监听上下滚动到随便某一个div时能获取到该div的id 财富值76

2016-10-25 23:11发布

<nav>     <ul>         <li><a href="#About">About</a></li>         <li><a href="#Skill">Skill</a></li>         <li><a href="#Experience">Experience</a></li>         <li><a href="#More">More</a></li>         <li><a href="#Contact">Contact</a></li>     </ul> </nav>  <div id = "About"> </div> <div id = "Skill"> </div> <div id = "AExperience"> </div> <div id = "More"> </div> <div id = "Contact"> </div>
2条回答

页面滚动时候,给上述a添加一个 ative的样式

一周热门 更多>