How to make the background DIV only transparent using CSS

后端 未结 8 670
予麋鹿
予麋鹿 2020-12-02 22:31

I am using CSS attrubutes :

filter: alpha(opacity=90);    

opacity: .9;

to make the DIV transparent,

相关标签:
8条回答
  • 2020-12-02 23:20

    It's not possible, opacity is inherited by child nodes and you can't avoid this. To have only the parent transparent, you have to play with positioning (absolute) of the elements and their z-index

    0 讨论(0)
  • 2020-12-02 23:21
    .modalBackground
        {
    
            filter: alpha(opacity=80);
            opacity: 0.8;
            z-index: 10000;
        }
    
    0 讨论(0)
提交回复
热议问题