通过js获取到一个元素后,修改元素的style 可以修改样式,
但是要把 css 属性改为驼峰命名
比如 obj.style.backgroundColor
但是为什么 obj.style['background-color']也能起作用
在obj.style 中并没有 看见 像background-color 这样的属性呀
通过js获取到一个元素后,修改元素的style 可以修改样式,
但是要把 css 属性改为驼峰命名
比如 obj.style.backgroundColor
但是为什么 obj.style['background-color']也能起作用
在obj.style 中并没有 看见 像background-color 这样的属性呀