CSS Opacity not working in IE11

前端 未结 4 1094
别那么骄傲
别那么骄傲 2020-12-17 16:31

I\'m trying to make the background-color of a tr opaque with this CSS:

.faded{
    background-color: red;
    height: 100px;
    op         


        
4条回答
  •  囚心锁ツ
    2020-12-17 17:14

    That appears to be yet another IE bug.. As a work-around, you could instead add the opacity via the background property with a rgba() color. Then simply add the opacity to the td element.

    Updated Example - results seem consistent across browsers.

    .faded {
        background-color: rgba(255, 0, 0, 0.4);
        height: 100px;
    }
    td {
        opacity:0.4
    }
    

提交回复
热议问题