不用锚点也可以平滑滚动到页面的指定位置 复制代码 代码如下: ScrollTo:平滑滚动到页面指定位置 <BR>.nav{width:500px;margin:10px auto;} <BR>.nav li{float:left; width:100px; height:24px; line-height:24px} <BR>.box{height:500px} <BR>.box h3{height:32px; line-height:32px; padding-left:20px; font-size:14px} <BR>.clear{clear:both} <BR>html,body,div,span,h1,h2,h3,h4,h5,h6,p,pre,a,code,em,img,small,strong,sub,sup,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent} <BR>a{color:#007bc4/*#424242*/; text-decoration:none;} <BR>a:hover{text-decoration:underline} <BR>ol,ul{list-style:none} <BR>table{border-collapse:collapse;border-spacing:0} <BR>body{height:100%; font:12px/18px "Microsoft Yahei", Tahoma, Helvetica, Arial, Verdana, "\5b8b\4f53", sans-serif; color:#51555C; background:#162934 url(../images/body_bg.gif) repeat-x} <BR>img{border:none} <BR>#main{width:910px; min-height:600px; margin:30px auto 0 auto; background:#fff; -moz-border-radius:12px;-khtml-border-radius: 12px;-webkit-border-radius: 12px; border-radius:12px;} <BR>h2.top_title{margin:4px 20px; padding-top:15px; padding-left:20px; padding-bottom:10px; border-bottom:1px solid #d3d3d3; font-size:18px; color:#a84c10;} <BR> <BR>$(function(){ <BR>$(".nav_pro").click(function(){ <BR>$.scrollTo('#pro',500); <BR>}); <BR>$(".nav_news").click(function(){ <BR>$.scrollTo('#news',800); <BR>}); <BR>$(".nav_ser").click(function(){ <BR>$.scrollTo('#ser',1000); <BR>}); <BR>$(".nav_con").click(function(){ <BR>$.scrollTo('#con',1200); <BR>}); <BR>$(".nav_job").click(function(){ <BR>$.scrollTo('#job',1500); <BR>}); <BR>}); <BR> ScrollTo:平滑滚动到页面指定位置 产品展示 新闻中心 服务支持 联系我们 人才招聘 产品展示 新闻中心 服务支持 联系我们 人才招聘 JS 插件:scroll to