JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myElement">test</div>

CSS

#myElement{
    height: 200px;
}

JavaScript

$(function(){
    $("#myElement").css("background-image", "-webkit-linear-gradient(top, #000000, #ffffff)");
    $("#myElement").css("background-image", "-moz-linear-gradient(top, black, white)");
});