CSS案例-纸牌滑动ins风

画质有点不清晰但效果大体是这样,知识点在上一个博客里,话不多说直接上代码

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

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

    #div01 {
        width: 200px;
        height: 300px;
        border-radius: 20px 20px;
        box-shadow: 15px 12px 8px #888;
        margin-left: 100px;
        margin-top: 100px;
        position: absolute;
        z-index: 1;
        border: 1px solid slategray;
    }

    #div02 {
        width: 200px;
        height: 300px;
        border-radius: 20px 20px;
        box-shadow: 15px 12px 8px #595858;
        margin-left: 10px;
        position: absolute;
        z-index: 2;
        border: 1px solid slategray;
        margin-top: 5px;
        animation: my_an 5s;

    }

    #div03 {
        width: 200px;
        height: 300px;
        border-radius: 20px 20px;
        box-shadow: 15px 12px 8px #888;
        margin-left: 10px;
        margin-top: 5px;
        position: absolute;
        z-index: 3;
        border: 1px solid slategray;
        animation: my_an 5s;
    }

    #div04 {
        width: 200px;
        height: 300px;
        border-radius: 20px 20px;
        box-shadow: 15px 12px 8px #888;
        margin-left: 10px;
        margin-top: 5px;
        position: absolute;
        z-index: 4;
        border: 1px solid slategray;
        animation: my_an 5s;
    }

    img {
        width: 200px;
        height: 300px;
        display: block;
        border-radius: 20px 20px;

    }

    @keyframes my_an {
        from {
            transform: none;
        }

        to {
            transform: translate(300px);
        }

    }
</style>

<body>
    <div id="div01">
        <div id="div02">
            <div id="div03">
                <div id="div04"><img src="img/07.jpg" alt=""></div>
                <img src="img/03.jpg" alt="">
            </div><img src="img/04.jpg" alt="">
        </div>
        <img src="img/05.jpg" alt="">
    </div>

</body>

</html>

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值