SkaveRat
SkaveRat

Reputation: 2282

Setting CSS style with dart

Is there an equivalent for the jQuery $.css function in dart?

I can read the (computed) style of an element, but as far as I can see there is no way of setting a style.

Upvotes: 3

Views: 2329

Answers (1)

Anthony Bobenrieth
Anthony Bobenrieth

Reputation: 2884

Using Element.style isnt enough ?

myDiv.style.backgroundColor = 'red';
myDiv.style.setProperty('-webkit-cssexperimental','value');

It's also working with a multi elements selector:

querySelectorAll('div').style.backgroundColor = 'green'; //color every div

Upvotes: 6

Related Questions