首页 > 代码库 > css 锚点

css 锚点

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>

  <a name="A0" id="A0"></a>

  <a href="http://www.mamicode.com/#A1">网页第一部分</a>

  <a href="http://www.mamicode.com/#A2">网页第二部分</a>

  <div style="height:900px; background:#CCCCCC"></div>

  <a name="A1" id="A1"></a>1<a href="http://www.mamicode.com/#A0">返回顶部</a>

  <div style="height:900px; background:#5e5a5a"></div>

  <a name="A2" id="A2"></a>2<a href="http://www.mamicode.com/#A0">返回顶部</a>

  <div style="height:900px; background:#000000"></div>

  </body>
</html>