第五天
定位
绝对定位absolute
相对定位relative
动画
1.变形函数transform
1-1.位移translate:translateX():在x轴位移
ctranslateX():在y轴位移
translate():在x,y轴同时位移
注:当translateX()与 ctranslateX()同时存在时,只会执行第二条
1-2.缩放scale:scale X():在x轴缩放
scale Y():在y轴缩放
scale ():在x,y轴缩放
注:当scale X()与 scale Y()同时存在时,只会执行第二条
1-3.旋转rotate:单位为度(deg)
2.css过渡transition
2-1.格式:transition:all 完成过渡所需要的时间(s) 指定过度函数 过渡开始时的延迟时间(s)
其中指定过度函数与过度开始时的延迟时间可省略
2-2.指定过度函数:ease:速度由快到慢(默认值)
linear:速度恒速(匀速运动)
ease-in:速度越来越快(渐显效果)
ease-out:速度越来越慢(渐隐效果)
ease-in-out:速度先加速再减速(渐显渐隐效果)

相关文章:

  • 2021-06-21
猜你喜欢
相关资源
相似解决方案