- animation关键字的使用
@keyframes 动画名{
from/0%{
动画开始的第一帧
}
50%{
}
to/100%{
动画结束的最后一帧
}
}
-
关于animation中的属性
-
animation-name 动画名
-
animation-duration 动画的执行时间
-
animation-iteration-count 动画执行的次数
number(执行次数) infinite(无限次执行)
-
animation-direction 动画执行的方向
alternate
-
animation-timing-function 动画的速度曲线
ease ease-in ease-out ease-in-out linear 线性变化
-
animation-delay 动画的延迟
-
关于动画效果
- 过渡
transition:属性 执行时间 速度曲线 延迟;
with
color
all 选中所有的属性
- 变形
transiform:函数
rotate 旋转 ===rotateZ
rotateX()
rotateY()
rotateZ()
skew 倾斜或者扭转
skew(x,y)
skewX(x)
skewY(y)
scale 放大或缩小
>1 放大
<1 缩小
transiform-origin 指定原点的变形
一个值 left right top bottom center
两个值 left top
具体像素值
三个值
第三个取值是length,代表在z轴的偏移
-
图片兼容性
解决: 1)把图片转换为块级元素 display:block; 2)把父元素的font-size:0px;