[HTML] 纯文本查看 复制代码 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery实现页面内锚点平滑跳转</title>
<base target="_blank" />
<style type="text/css">
#hovertree {
height: 800px;
background: red;
text-align:center;color:white;
}
#keleyi {
height: 800px;
background: green;text-align:center;color:white;
}
#myslider {
height: 800px;
background: black;text-align:center;color:white;
}
#zonemenu {
height: 800px;
background: yellow;text-align:center;
}
.keleyilink{position:fixed;}
.keleyilink a {text-decoration:none;}
</style>
</head>
<body>
<div class="keleyilink">
<a href="javascript:scroll('hovertree');" target="_self">HoverTree</a>
<a href="javascript:scroll('keleyi');" target="_self">Kevin-ying</a>
<a href="javascript:scroll('myslider');" target="_self">myslider</a>
<a href="javascript:scroll('zonemenu');" target="_self">ZoneMenu</a>
</div>
<div id="hovertree">hovertree
<br /><br /><br /><a href="http://www.kevin-ying.com">原文</a> <a href="http://www.kevin-ying.com">Kevin-ying</a> <a href="http://www.kevin-ying.com">HoverTree</a> <a href="http://www.kevin-ying.com">特效库</a>
</div>
<div id="keleyi">keleyi</div>
<div id="myslider">myslider</div>
<div id="zonemenu">zonemenu</div>
<script src="http://www.kevin-ying.com/jq/jquery-2.1.4.min.js"></script>
<script src="http://www.kevin-ying.com/jq/jquery.hovertreescroll.js"></script>
<script>
function scroll(id) {
$("#" + id).HoverTreeScroll(1000);
}
</script>
</body>
</html>
|