【css3】动画大风车

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<style>
    
.box{
    width: 0;
    height: 0;
    border-left: 100px solid yellow;
    border-right: 100px solid red;
    border-bottom: 100px solid green;
    border-top: 100px solid pink;
    border-radius: 50%;
    /*调用动画集*/
    animation-name: rotate;
    /*设置动画时间*/
    animation-duration: 2s;
    /*设置动画执行次数,无限循环*/
    animation-iteration-count: infinite;
    /*设置动画执行速度*/
    animation-timing-function: linear;
    /*动画逆波*/
    animation-direction: alternate;
    /*设置动画延时*/
    animation-delay: 1s;
    /*设置动画结束时候的状态*/
    animation-fill-mode: forwards;

    /*也可以一起设置*/
    /*animation: ;*/
}

.box:hover{
    animation-play-state: paused;
}

/*1.定义动画集*/

@keyframes rotate{
    /*定义开始状态 0%*/
    from{
        transform: rotateZ(0deg);
        /*transform: translate(0px);*/
    }
    /*定义结束状态 100%*/
    to{
        transform: rotateZ(360deg);
        /*transform: translate(200px);*/
    }
}

</style>
<body>
    <div class="box">
        
    </div>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值