阅读背景:

如何用突变观察者对特定的样式属性变化做出反应?

来源:互联网 

I've been experimenting with Mutation Observers, so far I can apply the relevant functions to react upon adding, removing elements and so on. Now I am wondering, is there a way to target a specific change within a specific style attribute? I know I can observe for attribute changes, but I just don't know how to observe for a specific attribute modification. For example, if the z-index value of #childDiv changes to 5678, modify the style of the parentDiv in order for it to be shown. I've been experimenting with Mutation Observers




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: