底层图片滑动

时间:2021-04-10 12:58:45   收藏:0   阅读:0
<!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>

技术图片

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!