且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CSS透明度不工作在IE11

更新时间:2022-12-01 15:04:16

这似乎是另一个IE错误..作为一个解决方法,你可以改为添加 opacity 通过background属性与 rgba()颜色。然后只需向 td 元素添加不透明度。

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
}