Sophie Huang
Time and tide wait for no man.

<a>标签除了用于链接之外,还是一个锚标签。

作为锚标签主要用于当页面内容太长,定位到指定的位置。下面以实例说明:

<html>
<head>
<title></title>

</head>
<body>
<div id="1" style="height:1000px;">
<p>文本1</p>
<a name="backto2"></a><p>文本2</p>
<p>文本3</p>
<p>文本4</p>
</div>
<div id="2"><a href="#backto2">定位到文本2</a></div>
</body>
</html>

 

 

posted on 2013-09-18 13:51  Sophie Huang  阅读(457)  评论(0编辑  收藏  举报