2017年8月5日
摘要: 添加一个onClick方法。onClick方法传入一个锚点的id,然后用下面的函数来找到锚点并跳转到锚点。 scrollToAnchor = (anchorName) => { if (anchorName) { // 找到锚点 let anchorElement = document.getEle 阅读全文
posted @ 2017-08-05 22:21 正正果实 阅读(4834) 评论(2) 推荐(1)