[position]返回顶部

position:fixed;实现

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>返回顶部</title>
</head>
<body style="margin: 0">
<div style=" 50px;height: 50px;background-color: aquamarine;
             position: fixed;
             bottom: 20px;
             right: 20px;

">返回顶部
</div>
<div style=" 100%;height: 5000px;background-color: antiquewhite">sfsf</div>
</body>
</html>
原文地址:https://www.cnblogs.com/iiiiher/p/6442370.html