Cross-browser (IE8-) getComputedStyle with Javascript?

后端 未结 5 1360
太阳男子
太阳男子 2020-11-28 10:58

Since IE8 does not support getComputedStyle, we can only use currentStyle. However, it does not return the real \"computed\" value

5条回答
  •  有刺的猬
    2020-11-28 11:10

    instead of :

    getComputedStyle !== 'undefined'
    

    it should be :

    typeof getComputedStyle !== 'undefined'
    

    otherwise it would never works.

提交回复
热议问题