语法
js
// Get an Animation object's target effect
var effect = animation.effect;
// Set an Animation's target effect
animation.effect = new KeyframeEffect({ opacity: [1, 0] }, 300);
值
KeyframeEffect 对象或 null。
规范
| 规范 |
|---|
| Web Animations> # dom-animation-effect> |