What  is css( ) method in jquey in hindi

Css() method ek jquery ke andar in built-in method hai.

Jiska use element or content ko stylling deneke liye hota hai.

Is ke help se aap kisi bhi element or content ko styling de or change kar sakte hai.

Jaise aap css aap css ke andar kisi bhi tag element ko styling dete hai waise hi css() method ke andar aap bade aasani se styling kar sakte hai .

Is Syntax :

1           1)      $(selector).css(“property”,”value”);

2           2)         $(selector).css({

                                      “property”:”value”;
    
                       });

Example :

Maan lo ki humare pass ek box hai . jiska background color red hai .



Hume uska background color jquery ke andar change karna hai to hum css() method ki help se hum uska background color change kar sakte hai.

Code :

1st method



2nd method



Output 



Upar dikhaye gaye example ki tarah aap css() method ka use karke jquery ke andar kisi bhi chiz ko css se styling de sakte hai.

Agar apko ek se jyada css property ka use karna hoga to aap 2nd method ko apna sakte hai.

Example :



Output