底层图片滑动

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }


        .boxTop:before {
            content: '';
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.4;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 2000px;
            z-index: -1;
            background: url(./75454.jpg) 0 / cover fixed;
        }

        .boxTop {
            width: 100%;
            margin: 1000px auto 0;
            height: auto;
            z-index: 9999;
            background-color: #fff;
        }
        .box{
            width: 100%;
            height: auto;
            min-height: 2000px;
            background: url(./4565413645.jpg) 0 / cover fixed;
        }
    </style>
</head>

<body>
    <div class="boxTop">
        <div class="box"></div>
    </div>
</body>

</html>

posted @ 2021-04-09 16:59  小夜猫啊  阅读(37)  评论(0编辑  收藏  举报