CSS3
scale()
函数和多重转换
1代表原始尺寸,2代表原始尺寸的两倍,以此类推
@keyframes
作为使用百分比的替代方法,可以使用from和to关键字
- from 为0%的起始点
- to 为100%的结束点
animation-name:(动画名字)
animation-duration:2s(动画时间)
div{
width:100px;
height:100px;
background-color:red;
animation-name:hei;
animation-duration:2s;
}
@keyframes hei{
0%{background-color:blue;}
50%{background-color:red;}
100%{background-color:green;}
}