Check out example codes for "jquery element css". It will help you in understanding the concepts better.

Code Example 1

$('#element').css('display', 'block'); /* Single style */
$('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style */

Code Example 2

//Set one style attribute
$('#element').css('display', 'block');
//Set multiple style attributes
$('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style *

Code Example 3

$(init);
    
function init() {
    $("h1").css("backgroundColor", "yellow");
    $("#myParagraph").css({"backgroundColor":"black","color":"white");
    $(".bordered").css("border", "1px solid black");
}

Code Example 4

Syntax:
$(selector).css(property-name:property-value);

Example:
$('.bodytext').css('color':'red');

Code Example 5

$('.ama').css('color':'red');

Learn ReactJs, React Native from akashmittal.com