动画...

 

 速度曲线 linear匀速            steps(x)、、分布动画分成x部完成

 

 

多组动画符合用 ,隔开

无缝动画 ,走马灯   6张图用3个图片的宽度显示,那么在六张图后面再加前面3张 

移动的方块 
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    @keyframes move {
    0%{
        transform: translateX(500px);
    }
        25%{
            transform: translateX(500px) translateY(300px);
            background-color: yellow;
        }
        50%{
            transform: translateX(0px) translateY(300px);
            background-color: blueviolet;

        }
        75%{
            transform: translateX(0px) translateY(0px);
            background-color: pink;
        }
        100%{
            transform: translateX(0) translateY(0);
        }
    }
    .box{
        width: 200px;
        height: 200px;
        background-color: blueviolet;
        animation: move 5s infinite alternate;  /*无线播放 正则播放*/
    }
  </style>
</head>
<body>
 <div class="box"></div>
</body>
</html>

 

如果没有给高,图片不会显示出来  ,然后body给到了高还是没有显示 ,那么就应该去查看父元素,给父元素设置一个就好了

background-size:  contain  等比例缩放

                              cover 覆盖   >>>>>>>>>>所以应该使用cover

大波浪动画  》》》》》》》》》》》》》》

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    body{
      background-color: #222;
    }
    @keyframes move {
      0%{
        transform: translateZ(0px);
        background-color: #222;
      }
      100%{
        transform: translateZ( 200px);
        background-color: #fff;
      }

    }
    .fa{
      transform-style: preserve-3d;
      perspective: 1000px;
      background-color: #222;

      height: 400px;
      width: 400px;
      margin:  100px auto;


    }
    .son{
      float: left;
      height: 100px;
      width: 100px;
      background-color: black;
      transition: all 0.5s;
      animation: move 1s infinite alternate;

    }
/*    .son:hover{
      transform: translateX(50px);
    }*/
    /*.son:nth-child(1)
    {
      animation-delay:0.1s ;
    }
    .son:nth-child(2){
      animation-delay: 0.2s
    ;
    }
    .son:nth-child(3){
      animation-delay: 0.3s
    ;
    }
    .son:nth-child(4){
      animation-delay: 0.4s
    ;
    }
    .son:nth-child(5){
      animation-delay: 0.5s
    ;
    }*/
  </style>
</head>
<body>
<div class="fa">
 <!-- <div class="son"></div>
  <div class="son"></div>
  <div class="son"></div>
  <div class="son"></div>
  <div class="son"></div>-->
</div>
<script>
  let fa=document.querySelector('.fa');
  let str='';
  for (let j=1;j<=10;j++){
  for (let i=1;i<=10;i++){
    str+='<div class="son" style="width: 40px;height: 40px;animation-delay:${(i+j)*0.3}s"></div>'
  }}
  fa.innerHTML=str;
</script>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值