HTML 超链接,锚点,定位

来源:互联网 发布:ceic数据库免费账号 编辑:程序博客网 时间:2024/04/30 00:08

1.要定位的位置:

<a name="top"></a>  <!--定位到此处-->

2.超链接的位置:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head>  <title>链接</title>  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />  <meta name="author" content="" />  <meta name="keywords" content="" />  <meta name="description" content="" />  <link rel="stylesheet" type="text/css" href="" />  <style type="text/css"></style>  <script type="text/javascript"></script> </head> <body><a href="a.html#top">回到top的位置</a>  <!--定位到a.html页面的top位置--> </body></html>


原创粉丝点击