I. Background 1. How to set the background color of the label (1) has a background-color in CSS: attribute value; is designed to set the background color of the label. (2) Value: specific words, RGB, RGBA, hex examples:

    <style> 

        .P1 { 

            background-Color: Red; 

        } 

        .p2 { 

            background-Color: RGB (0,255,0); 

        } 

        .p3 { 

            background-Color: RGBA (0,0,255,1); 

        } 

        .p4 { 

             background- Color: # 00FFFF; 

         } 

</ style> 

</ head> 

<body> 

<P class = "P1"> Trial I </ P> 

<P class = "P2"> Trial I </ P> 

< p class = "p3"> I'm Trials </ p> 

<the p-class = "P4"> I'm Trials </ p>

Guess you like

Origin www.cnblogs.com/lee1-w/p/11410413.html