Loading Please Wait...

Logo Lynxsia IT Solutions

CSS Opacity

CSS Opacity

The CSS opacity property specifies the opacity/transparency of an element.

The CSS opacity property can take a value from 0.0 - 1.0. The lower the value, the more transparent.

					 
        
          opacity: 0.9;
          opacity: 90%;

          /* Global values */
          opacity: inherit;
          opacity: initial;
          opacity: revert;
          opacity: revert-layer;
          opacity: unset;
        
      
Issue With Opacity

When we use the opacity property to add transparency to the background of an element, all of its child elements inherit the same transparency. This can make the text inside a fully transparent element hard to read and image may be unclear.

Transparency With Alpha Colors

If you do not want to apply opacity to child elements, use color with alpha values such as RGBA, HEXA, HSLA, etc.

					 
        
          background: rgba(0, 0, 0, 0.3);
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved