14transform变化样式

最近新学了思维导图,就用图来表示吧
transform变化样式
他们的复合样式位置的不同会导致效果的不同。
比如这样:
①transform:translateX(200px) translateY(300px) rotate(45deg);
变化1
②transform:rotate(45deg) translateX(300px) translateY(200px) ;
变化2
话不多说,下边是一个摩天轮旋转代码:

/*css样式*/
 <style>
        body{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .box{
            width: 1547px;
            height: 1000px;
            background-image:url(images/bg.png);
            margin:auto;
            position: relative;
        }
        .wheel{
            width: 768px;
            height: 768px;
            background-image:url(images/fsw.png);
            position: relative;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            margin: auto;
            animation: center 8s infinite linear;
        }
        .child01{
            width: 130px;
            height: 170px;
            background-image: url(images/boy.png);
            position: absolute;
            top: 300px;
            left: 0;
            animation: center 8s infinite linear;
            animation-direction: reverse;
        }
        .child02{
            width: 130px;
            height: 170px;
            background-image: url(images/girl.png);
            position: absolute;
            top: 100px;
            left: 600px;
            animation: center 8s infinite linear;
            animation-direction: reverse;
        }
        .child03{
            width: 130px;
            height: 170px;
            background-image: url(images/shamegirl.png);
            position: absolute;
            top: 600px;
            left: 470px;
            animation: center 8s infinite linear;
            animation-direction: reverse;
        }
        @keyframes center {
            0%{
                transform: rotate(0deg);
            }
            100%{
                transform: rotate(360deg);
            }
        }
    </style>
    <body> <!-- 主体区--> 
    <div class="box">
        <div class="wheel">
            <div class="child01"></div>
            <div class="child02"></div>
            <div class="child03"></div>
        </div>
    </div>
</body>

效果图:
摩天轮

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值