添加锚点功能

锚点功能top

 
 
 
 
 

点我上顶部

 

 

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>锚点功能</title>
</head>
<body>
<a href="https://www.baidu.com"></a>
<a href="" id="a1">top</a>
<div style="height:1000px;background-color: red"></div>
<div style="height:1000px;background-color: green"></div>
<div style="height:1000px;background-color: yellow"></div>
<div></div>
<div></div>
<a href="#a1">点我上顶部</a>
</body>
</html>
posted @ 2019-04-08 16:15  夜晚的潜水艇  阅读(261)  评论(0)    收藏  举报