I'm trying to find a equivalent to jQuery.css() method
In my specific case, I want to set a background image for a canvas.
in jQuery, it would be:
$("#canvas").css("background-image", "url(./assets/gridPattern.png)");
I'm trying to find a equivalent to jQuery.css() method
In my specific case, I want to set a background image for a canvas.
in jQuery, it would be:
$("#canvas").css("background-image", "url(./assets/gridPattern.png)");
It is possible to acess CSS properties via the style attribute in Element
query("#canvas").style.backgroundImage = "url(./assets/gridPattern.png)";