CSS----动画

1、在哪儿产生动画,比如:width height background-color

2、动画的时间,比如:1s 500ms 0.5s

3、运动曲线,比如linear匀速、ease首尾慢

4、延迟多长时间开始动画


运动曲线:all 1s linear      匀速

                  all 1s ease       开始和结束慢速,中间加速

                  all 1s ease-in     开始慢速,结尾突然停止

                  all 1s ease-out       突然开始,结尾慢速

                  all 1s ease-in-out       开始和结束慢速


transfrom变形: translate(100px,100px)             位移

                           rotate(360deg)                          旋转

                            scale(0.5, 0.2)                          缩放

                            skew(0, 45deg)                         斜切


设置盒子按3D空间显示:transform-style: preserve-3d

设置透视距离:perspective

animation-play-state: paused           动画暂停

animation-play-state: running           动画运行


     多帧动画:          @keyframes moving{

                                          0%  {    transform: translateY(0px);

                                                   }

                                          50% { transform: translateY(400px);

                                                   }

                                           100% { transform: translateY(0px);

                                                    }

                                          }





就算跌倒,也要豪迈的笑

你可能感兴趣的:(CSS----动画)