position固定标签

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Position用法</title>
    <style>
            .div5{
            position: fixed;  /*固定标签*/
            bottom: 25px;
            right: 25px;
        }
        .div1{
            background-color:purple;
            height: 500px;
            width: revert;
        }
        .div2{
            background-color: red;
            height: 500px;
            width: revert;
        }

    </style>
</head>
<body>
    <div id="top"></div>
    <div class="div2">div1</div>
    <div class="div1">div2</div>
    <a class="div5" href="#top">返回上一层</a>
</body>
</html>
原文地址:https://www.cnblogs.com/TKOPython/p/12727869.html