你能告诉我为什么我们只需要使用这个getPropertyValue方法就可以使用这个方法getComputedStyle吗?
例如,据我所知,这将起作用:
var s = getComputedStyle(element, null).opacity;
Run Code Online (Sandbox Code Playgroud)
这相当于以下内容:
var s = getComputedStyle(element, null).getPropertyValue('opacity');
Run Code Online (Sandbox Code Playgroud)
我们可以getComputedStyle不用getPropertyValue吗?