KroLong

博客园 首页 新随笔 联系 订阅 管理

定义好容器id,在<a>标签中的href中用“#+id”就实现跳转了。

 

    <a href="#ct1">跳转到词条1</a>
    <a href="#ct2">跳转到词条2</a>
    <br>
    <div id="ct1" style="height:1000px;"><a href="#">词条1</a></div>
    <div id="ct2" style="height:1000px;"><a href="#">词条2</a></div>

 

显示效果:

posted on 2016-08-05 10:15  KroLong  阅读(224)  评论(0编辑  收藏  举报