1.直接创建动画
格式:
<Animate> Element.animate(keyframes, options)
对象形式
element.animate(
{
opacity: [0, 0.9, 1],
offset: [0, 0.8], // [ 0, 0.8, 1 ] 的简写
easing: ["ease-in", "ease-out"],
},
2000
);
约 760 字...
格式:
<Animate> Element.animate(keyframes, options)
element.animate(
{
opacity: [0, 0.9, 1],
offset: [0, 0.8], // [ 0, 0.8, 1 ] 的简写
easing: ["ease-in", "ease-out"],
},
2000
);