关键帧动画-属性
/*声明动画*/
@keyframes identifier {
from{
width: 200px;
height:200px;
background:
red;
to{
width: 400px;
height:600px;
background:
green;}
}
还可以使用
0%
25%
50%
100% 的 百分比写法定义n多个动画
关键帧动画-单一属性
{animation-fill-mode: forwards;}
none 默认值
forwards 最后的画面
backwards 初始画面
关键帧动画-轮播案例笔记
主要思路:
改变X得值
关键帧动画-逐帧动画案例
animation: run 5s steps(1,end);
因为逐帧所以不可以使用linear
animate动画库
网格布局
给什么标签都可以加上display:grid 会使其变成块
举例子:固定值三行三列
grid-template-rows: 200px 200px 200px;
grid-template-columns: 200px 200px 200px;
百分比四行四列
grid-template-rows: 25% 25% 25% 25%;
grid-template-columns: 25% 25% 25% 25%;
重复三行三列
grid-template-rows: repeat(3,33,33%);
grid-template-columns: repeat(3,33,33%);
自动重复
grid-template-rows: repeat(auto-fill,Bb0px);
grid-template-columns: repeat(auto-fill,20%);
fr 片段
grid-template-rows: 100px 1fr 300px;
grid-template-columns: 100px 1fr 300px;
min 和max
grid-template-rows: minmax(100px,200px) 200px 300px;
grid-template-columns: 200px 200px 200px;
auto和fr很像
grid-template-rows: 100px auto 200px;
grid-template-columns: 100px auto 20ppx;
网格布局-间距
形状只可以正方形或者矩形
网格布局-对齐方式
网格布局-项目属性
grid-column: 1/5; 第一条到第五条
grid-row:1/3;