css3小鸟飞翔案例代码+css3西游记动画案例代码

小鸟飞翔案例代码:

在这里插入代码片<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background: url(../img/2.jpg) no-repeat 0 0/cover;
        }
        .box{
            width: 144px;
            height: 79px;
            overflow: hidden;
            animation: ff 10s linear infinite forwards;
            /* border: 1px solid red; */
            /* transition: all 20s steps(8);
            transform: translateX(500px); */
            
        }
        .xn{
            width: 1152px;
            height: 79px;
            animation: xn1 0.5s steps(8) infinite;
        }
        @keyframes ff{
            0%{
                transform: translate(0,0);
            }
            25%{
                transform: translate(400px,200px);
            }
            50%{
                transform: translate(800px,-20px);
            }

            75%{
                transform: translate(1200px,200px);
            }
            100%{
                transform: translate(1600px,0);
            }
        }
        @keyframes xn1{
            0%{
                transform: translate(0,0);
            }
           100%{
                transform: translate(-1152px,0);
            }
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="xn"><a href=""><img src="../img/111.png" alt=""></a></div>
    </div>
</body>
</html>

西游记代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 1000px;
            height: 500px;
            overflow: hidden;
            margin: 100px auto;
            position: relative;
        }
        .zt{
            width: 1000px;
            height: 200px;
            background-color: rgba(rgb(221, 184, 184), rgb(102, 109, 102), rgb(85, 85, 89), .1);
            position: absolute;
            right: 0;
            bottom: -200px;
        }
        .box:hover .zt{
            transform: translate(0,-60px);
            transition: all 2s linear;
        }
        .box>img{
            width: 1300px;
            height: 500px;
            position: absolute;
            right: 0;
            top: 0;
            animation: tp 10s linear infinite;
        }
        @keyframes tp{
            0%{
                transform: translate(0,0);
            }
            100%{
                transform: translate(300px,0);
            }
        }
        .swk{
            width: 200px;
            height: 180px;
            overflow: hidden;
            position: absolute;
            top: 300px;
            left: 100px;
        }
        .swk img{
            width: 1600px;
            height: 180px;
            animation: sun 2s steps(8) infinite;
        }
        @keyframes sun{
            0%{
                transform: translate(0,0);
            }
            100%{
                transform: translate(-1600px,0);
            }
        }
        .zbj{
            width: 200px;
            height: 180px;
            overflow: hidden;
            position: absolute;
            top: 300px;
            left: 250px;
        }
        .zbj img{
            width: 1600px;
            height: 180px;
            animation: zhu 2s steps(8) infinite;
        }
        @keyframes zhu{
            0%{
                transform: translate(0,0);
            }
            100%{
                transform: translate(-1600px,0);
            }
        }
        .ts{
            width: 170px;
            height: 240px;
            overflow: hidden;
            position: absolute;
            top: 270px;
            left: 440px;
        }
        .ts img{
            width: 1360px;
            height: 240px;
            animation: tang 2s steps(8) infinite;
        }
        @keyframes tang{
            0%{
                transform: translate(0,0);
            }
            100%{
                transform: translate(-1360px,0);
            }
        }
        .sc{
            width: 210px;
            height: 200px;
            overflow: hidden;
            position: absolute;
            top: 300px;
            left: 600px;
        }
        .sc img{
            width: 1680px;
            height: 200px;
            animation: sha 2s steps(8) infinite;
        }
        @keyframes sha{
            0%{
                transform: translate(0,0);
            }
            100%{
                transform: translate(-1680px,0);
            }
        }
    </style>

</head>
<body>
    <div class="box">
        <img src="../img/ft2_7b14393.png" alt="">
        <div class="swk">
            <img src="../img/sun.png" alt="">
        </div>
        <div class="zbj">
            <img src="../img/zhu.png" alt="">
        </div>
        <div class="ts">
            <img src="../img/tang.png" alt="">
        </div>
        <div class="sc">
            <img src="../img/sha.png" alt="">
        </div>
        <div class="zt">
            111111111111111111111111111111111111111111111111111111111111111
        </div>
    </div>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

快秃头的小爽

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值