The css() method sets or returns one or more style properties of the selected element.
Set CSS properties
To set specific CSS properties, please use the following syntax:
css("propertyname","value");
The following example will set the background-color value for all matching elements:
Example
$("p").css ("background-color","yellow");
Set multiple CSS properties
To set multiple CSS properties, please use the following syntax:
css({"propertyname":"value","propertyname":"value ",...});
The following example will set the background-color and font-size for all matching elements:
Example
$("p").css({"background-color":"yellow","font-size ":"200%"});