【2.9】网页返回顶部

方法一(最简单的方法)

body中加入如下一句代码

<body>
	<a class="back-to-top" href="#top">返回顶部</a>
	.....
</body>

css中添加如下:

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 10px;
    width: 100px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    color: #2C2C2C;
    color: red;
    text-decoration: none;
    border: 1px solid #CCCCCC;
}

参考资料

https://www.cnblogs.com/bozai8/p/6927978.html

药企,独角兽,苏州。团队长期招人,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn