Is the 'getPropertyValue' method required for retrieving CSS?
问题 Could you tell me why we need to use the getPropertyValue method if we can use only the getComputedStyle one? For example, this will work, as far as I understand: var s = getComputedStyle(element, null).opacity; Which is equivalent to the following: var s = getComputedStyle(element, null).getPropertyValue('opacity'); Can we use getComputedStyle without getPropertyValue ? 回答1: According to the old DOM L2 Style, getPropertyValue was not required: The CSS2Properties interface represents a