Confirmed users
490
edits
| Line 11: | Line 11: | ||
Here's an overview of the steps required to animate a specific CSS property on a specific element, using <code>getOverrideStyle()</code>, during a SMIL animation sample: | Here's an overview of the steps required to animate a specific CSS property on a specific element, using <code>getOverrideStyle()</code>, during a SMIL animation sample: | ||
# Call <code>getOverrideStyle()</code> on the element, and from this, | # Call <code>getOverrideStyle()</code> on the element, and from this, clear any existing value for the CSS property in question. (This ensures that <code>getComputedStyle()</code> won't reflect any animation effects, so it can be used as a 'base value' for animation in the next step) | ||
# Perform SMIL interpolation & compositing for the CSS property, using <code>getComputedStyle()</code> as the base value. | # Perform SMIL interpolation & compositing for the CSS property, using <code>getComputedStyle()</code> as the base value. | ||
# Store the final composited value of the property in <code>getOverrideStyle()</code>. | # Store the final composited value of the property in <code>getOverrideStyle()</code>. | ||