How to make div background color transparent in CSS

前端 未结 6 2041
不知归路
不知归路 2020-12-02 04:21

I\'m not using CSS3. So I can\'t use opacity or filter attributes. Without using these attributes how can I make the background-color

6条回答
  •  误落风尘
    2020-12-02 05:17

        /*Fully Opaque*/
        .class-name {
          opacity:1.0;
        }
    
        /*Translucent*/
        .class-name {
          opacity:0.5;
        }
    
        /*Transparent*/
        .class-name {
          opacity:0;
        }
    
        /*or you can use a transparent rgba value like this*/
        .class-name{
          background-color: rgba(255, 242, 0, 0.7);
          }
    
        /*Note - Opacity value can be anything between 0 to 1;
        Eg(0.1,0.8)etc */
    

提交回复
热议问题