SMIL:CSS Animation: Difference between revisions

Jump to navigation Jump to search
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, remove any settings 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)
# 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>.
Confirmed users
490

edits

Navigation menu