在Dart中是否有jQuery $.css
函数的等价物?
我可以读取元素的(计算的)样式,但据我所知,没有设置样式的方法。
仅仅使用Element.style还不够吗?
myDiv.style.backgroundColor = 'red';
myDiv.style.setProperty('-webkit-cssexperimental','value');
它也可以使用多元素选择器:
querySelectorAll('div').style.backgroundColor = 'green'; //color every div