Page 126 - CSS
P. 126

property, such as background-color. The example below shows the children using the color set in
        the parent as its background:


         .parent-class {
             color: blue;
         }

         .parent-class .child-class {
             background-color: currentColor;
         }


        Possible Result:































        rgba() Notation



        Similar to rgb() notation, but with an additional alpha (opacity) value.


         .red {
             /* Opaque red */
             color: rgba(255, 0, 0, 1);
         }

         .red-50p {
             /* Half-translucent red. */
             color: rgba(255, 0, 0, .5);
         }


        Syntax



         rgba(<red>, <green>, <blue>, <alpha>);



          Value     Description

          <red>     an integer from 0 - 255 or percentage from 0 - 100%




        https://riptutorial.com/                                                                             104
   121   122   123   124   125   126   127   128   129   130   131