QuentinKshitij Saxena -KJ-提出了一个问题:Changing a CSS rule-set from Javascript,或许与您遇到的问题类似。
回答者CommunityAlex Gyoshev给出了该问题的处理方式:
You can, but it's rather cumbersome. The best reference on how to do it is the following article: Totally Pwn CSS with Javascript (web archive link).
I managed to get it to work with Firefox and IE - <del>I couldn't in Chrome, though it appears that it supports the DOM methods.</del>ricosrealm reports that it works in Chrome, too.
希望本文对你有帮助,欢迎支持JavaScript中文网
来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/15037