Skip to content

动画和过渡

css说明style备注
atp.a全部属性过渡transition-property: all;
atp.n无属性过渡transition-property: none;
atp.w宽度过渡transition-property: width;
atp.h高度过渡transition-property: height;
atp.m外边距过渡transition-property: margin;
atp.mt上外边距过渡transition-property: margin-top;
atp.mb下外边距过渡transition-property: margin-bottom;
atp.ml左外边距过渡transition-property: margin-left;
atp.mr右外边距过渡transition-property: margin-right;
atp.l左位置过渡transition-property: left;
atp.r右位置过渡transition-property: right;
atp.t上位置过渡transition-property: top;
atp.b下位置过渡transition-property: bottom;
atp.p内边距过渡transition-property: padding;
atp.pl左内边距过渡transition-property: padding-left;
atp.pr右内边距过渡transition-property: padding-right;
atp.pt上内边距过渡transition-property: padding-top;
atp.pb下内边距过渡transition-property: padding-bottom;
atp.o透明度过渡transition-property: opacity;
atp.bc背景颜色过渡transition-property: background-color;
atp.boc边框颜色过渡transition-property: border-color;
atp.btc上边框颜色过渡transition-property: border-top-color;
atp.bbc下边框颜色过渡transition-property: border-bottom-color;
atp.blc左边框颜色过渡transition-property: border-left-color;
atp.brc右边框颜色过渡transition-property: border-right-color;
atp.tr变换过渡transition-property: transform;
attf.eease过渡效果transition-timing-function: ease;
attf.eiease-in过渡效果transition-timing-function: ease-in;
attf.eoease-out过渡效果transition-timing-function: ease-out;
attf.eioease-in-out过渡效果transition-timing-function: ease-in-out;
attf.l线性过渡效果transition-timing-function: linear;
attf.cb自定义三次贝塞尔曲线过渡效果transition-timing-function: cubic-bezier();需要指定具体的贝塞尔曲线参数
atd.500动画时间transition-duration:500ms;
atr.90
atr.90.1
旋转transform:rotate(90deg);
transform:rotate(-90deg);
atrx.90
atrx.90.1
X轴旋转transform:rotateX(90deg);
transform:rotateX(-90deg);
atry.90
atry.90.1
Y轴旋转transform:rotateY(90deg);
transform:rotateY(-90deg);
atrz.90
atrz.90.1
Z轴旋转transform:rotateZ(90deg);
transform:rotateZ(-90deg);
ats.0.5缩放transform:scale(0.5);
atsx.0.5X轴缩放transform:scaleX(0.5);
atsy.0.5Y轴缩放transform:scaleY(0.5);
att.50
att.50.1
移动transform:translate(50rpx);
transform:translate(-50rpx);
attx.50
attx.50.1
X轴移动transform:translateX(50rpx);
transform:translateX(-50rpx);
atty.50
atty.50.1
Y轴移动transform:translateY(50rpx);
transform:translateY(-50rpx);
ato.top,left
ato.100%,50%
变换的中心点transform-origin:top left;
transform-origin:100% 50%;