Home > Web Front-end > JS Tutorial > body text

You can smoothly scroll to a specified position on the page without anchor points. Implementation code_jquery

WBOY
Release: 2016-05-16 17:34:20
Original
1371 people have browsed it

You can smoothly scroll to a specified position on the page without anchoring

Copy the code The code is as follows:





ScrollTo: Smoothly scroll to the specified position on the page

< ;style type="text/css">
.nav{width:500px;margin:10px auto;}
.nav li{float:left; width:100px; height:24px; line-height: 24px}
.box{height:500px}
.box h3{height:32px; line-height:32px; padding-left:20px; font-size:14px}
.clear{clear:both }
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 }
a{color:#007bc4/*#424242*/; text-decoration:none;}
a:hover{text-decoration:underline}
ol,ul{list-style:none}
table{border-collapse:collapse;border-spacing:0}
body{height:100%; font:12px/18px "Microsoft Yahei", Tahoma, Helvetica, Arial, Verdana, "5b8b4f53", sans -serif; color:#51555C; background:#162934 url(../images/body_bg.gif) repeat-x}
img{border:none}
#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;}
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;}


< ;script type="text/javascript" src="http://jt.875.cn/js/scrollto.js">




ScrollTo: Smoothly scroll to the specified position on the page








News Center




Service Support



< ;div id="con" class="box">

Contact us




Talent Recruitment







JS plug-in: scroll to
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template