天天看点

html页面实现指定位置的跳转

<a href="#ct1">跳转到词条1</a>

<a href="#ct2">跳转到词条2</a>

<br>

<div id="ct1" style="height:1000px;">词条1</div>

<div id="ct2">词条2</div>

底下定好容器的id,在a的href中用#+id,就可以实现跳转了。